Cluster logging is configurable using a Cluster logging 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 Cluster logging 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 Cluster logging 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
rsyslog:
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.