Kubernetes Tolerations

Taints and tolerations work together to control which pods land on which nodes. Taints go on nodes and repel pods. Tolerations go on pods and let them ignore specific taints. Taint effects There are three effects: NoSchedule — pods without a matching toleration won’t be scheduled on the node. Existing pods are unaffected. PreferNoSchedule — the scheduler avoids the node but will use it if there’s nowhere else. NoExecute — pods without a matching toleration are evicted from the node and won’t be rescheduled there. Applying taints # Add a taint kubectl taint nodes node1 example-key=example-value:NoSchedule # Remove a taint kubectl taint nodes node1 example-key=example-value:NoSchedule- # Multiple taints at once kubectl taint nodes node1 key1=value1:NoSchedule key2=value2:PreferNoSchedule View taints on a node: ...

11 July 2023 · Shafiq Alibhai