Cluster logging is configurable using a ClusterLogging
custom resource (CR) deployed
in the openshift-logging
project.
The Cluster Logging Operator watches for changes to Cluster Logging CRs,
creates any missing logging components, and adjusts the logging deployment accordingly.
The Cluster Logging CR is based on the ClusterLogging
custom resource Definition (CRD), which defines a complete cluster logging deployment
and includes all the components of the logging stack to collect, store and visualize logs.
Sample ClusterLogging
custom resource (CR)
apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
creationTimestamp: '2019-03-20T18:07:02Z'
generation: 1
name: instance
namespace: openshift-logging
spec:
collection:
logs:
fluentd:
resources: null
type: fluentd
curation:
curator:
resources: null
schedule: 30 3 * * *
type: curator
logStore:
elasticsearch:
nodeCount: 3
redundancyPolicy: SingleRedundancy
resources:
limits:
cpu:
memory:
requests:
cpu:
memory:
storage: {}
type: elasticsearch
managementState: Managed
visualization:
kibana:
proxy:
resources: null
replicas: 1
resources: null
type: kibana
You can configure the following for cluster logging:
-
You can place cluster logging into an unmanaged state that allows an administrator to assume full control of individual
component configurations and upgrades.
-
You can overwrite the image for each cluster logging component by modifying the appropriate
environment variable in the cluster-logging-operator
Deployment.
-
You can specify specific nodes for the logging components using node selectors.