You can ensure which nodes the logging collector Pods run on and prevent
other workloads from using those nodes by using tolerations on the Pods.
You apply tolerations to logging collector 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 logging collector Pods can run on that node.
By default, the logging collector Pods have the following toleration:
- effect: "NoExecute"
Use the following command to add a taint to a node where you want logging collector Pods to schedule logging collector Pods:
$ oc adm taint nodes <node-name> <key>=<value>:<effect>
$ oc adm taint nodes node1 collector=node:NoExecute
This example places a taint on
node1 that has key
node, and taint effect
You must use the
NoExecute effect schedule.
NoExecute schedules only Pods that match the taint and remove existing Pods
that do not match.
collection section of the Cluster Logging Custom Resource (CR) to configure a toleration for the logging collector Pods:
- key: "collector" (1)
operator: "Exists" (2)
effect: "NoExecute" (3)
tolerationSeconds: 6000 (4)
||Specify the key that you added to the node.
Exists operator to require the
effect parameters to match.
||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 this toleration would be able to schedule onto