Taints & Tolerations
Taints repel pods unless they have matching tolerations, controlling which pods can run on nodes.
Node with Taint
key=value:NoSchedule
Pod with Toleration
key=value:NoSchedule
Mental Model
Taints are "Do Not Enter" signs on rooms. Only people with a special key (toleration) can enter. This lets you dedicate nodes to specific workloads or keep problematic pods away from critical nodes.
YAML Example
# Add taint to node
kubectl taint nodes node1 key=value:NoSchedule
# Pod with toleration
apiVersion: v1
kind: Pod
spec:
tolerations:
- key: "key"
operator: "Equal"
value: "value"
effect: "NoSchedule"
containers:
- name: app
image: myappCommon Misconceptions
- ✗Taints prevent all pods - FALSE: Only pods without matching tolerations
- ✗Tolerations force scheduling - FALSE: Just allow scheduling
- ✗All nodes have taints - FALSE: Taints are added deliberately
Key Takeaways
- • Taints repel pods unless they have matching tolerations, controlling which pods can run on nodes.
- • Taints are "Do Not Enter" signs on rooms. Only people with a special key (toleration) can enter. Thi...
- • Check the YAML example for implementation details
- • Be aware of the common misconceptions listed above