Chapter 8. Moving the cluster logging resources with node selectors
You can use node selectors to deploy the Elasticsearch, Kibana, and Curator pods to different nodes.
8.1. Specifying a node for cluster logging components using node selectors Copy linkLink copied to clipboard!
Each component specification allows the component to target a specific node.
Prerequisites
- Cluster logging and Elasticsearch must be installed. These features are not installed by default.
Procedure
Add the desired label to your nodes:
$ oc label <resource> <name> <key>=<value>For example, to label a node:
$ oc label nodes ip-10-0-142-25.ec2.internal type=elasticsearchEdit the Cluster Logging Custom Resource in the
openshift-loggingproject:$ oc edit ClusterLogging instance apiVersion: "logging.openshift.io/v1" kind: "ClusterLogging" metadata: name: "nodeselector" spec: managementState: "Managed" logStore: type: "elasticsearch" elasticsearch: nodeSelector:1 logging: es nodeCount: 1 resources: limits: memory: 2Gi requests: cpu: 200m memory: 2Gi storage: size: "20G" storageClassName: "gp2" redundancyPolicy: "ZeroRedundancy" visualization: type: "kibana" kibana: nodeSelector:2 logging: kibana replicas: 1 curation: type: "curator" curator: nodeSelector:3 logging: curator schedule: "*/10 * * * *" collection: logs: type: "fluentd" fluentd: nodeSelector:4 logging: fluentd