You can control which nodes the log store Pods runs on and prevent
other workloads from using those nodes by using tolerations on the Pods.
You apply tolerations to the log store Pods through the Cluster Logging Custom Resource (CR)
and apply taints to a node through the node specification. A taint on a node is a
key:value pair that
instructs the node to repel all Pods that do not tolerate the taint. Using a specific
that is not on other Pods ensures only the log store Pods can run on that node.
By default, the log store Pods have the following toleration:
- effect: "NoExecute"
Use the following command to add a taint to a node where you want to schedule the cluster logging Pods:
$ oc adm taint nodes <node-name> <key>=<value>:<effect>
$ oc adm taint nodes node1 elasticsearch=node:NoExecute
This example places a taint on
node1 that has key
node, and taint effect
Nodes with the
NoExecute effect schedule only Pods that match the taint and remove existing Pods
that do not match.
logstore section of the Cluster Logging Custom Resource (CR) to configure a toleration for the Elasticsearch Pods:
- key: "elasticsearch" (1)
operator: "Exists" (2)
effect: "NoExecute" (3)
tolerationSeconds: 6000 (4)
||Specify the key that you added to the node.
Exists operator to require a taint with the key
elasticsearch to be present on the Node.
||Optionally, specify the
tolerationSeconds parameter to set how long a Pod can remain bound to a node before being evicted.
This toleration matches the taint created by the
oc adm taint command. A Pod with this toleration could be scheduled onto