Adding tolerations to components in the Rancher Logging chart
Article Number: 000020895
Environment
- SUSE Rancher 2.7.x
- SUSE Rancher 2.8.x
- Rancher Logging Chart
- Taints defined on cluster nodes
Situation
The "fluentbit" pods are not be present on all nodes, and logs are not collected.
When deploying the Rancher logging chart, Pods will not be scheduled where user-added taints are present on cluster nodes if tolerations are not set on the rancher-logging chart. If only some nodes within the cluster are tainted, logs will be missing from those nodes. If all nodes are tainted, no logs will be forwarded and Pods for Deployments within the Rancher Logging will fail to schedule with an error of the following format
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling <unknown> default-scheduler 0/3 nodes are available: 3 node(s) had taints that the pod didn't tolerate
Cause
Nodes with specific taints will deny the scheduling of any pod if no matching toleration is present on the workload.
Resolution
If there are user-added taints on nodes within the cluster, tolerations for these taints must be added in the rancher-logging chart via the tolerations value, alongside the default cattle.io/os=linux NoSchedule toleration.
For example, if the taint with key=foo, value=bar and effect=NoSchedule is present on nodes within the cluster, the following tolerations should be defined in the values of the rancher-logging Chart:
tolerations:
- key: cattle.io/os
operator: "Equal"
value: "linux"
effect: NoSchedule
- key: foo
operator: "Equal"
value: "bar"
effect: NoSchedule