Example Documentation: Taints Affinity
Goal
Trace targeted scheduling with node labels, node affinity and tolerations.
What Is Done
A Pod requires a node with workshop-role=isolated and also tolerates the taint workshop=isolated:NoSchedule.
Typical Commands
kubectl label node <node-name> workshop-role=isolated
kubectl taint node <node-name> workshop=isolated:NoSchedule
kubectl apply -f manifests/
kubectl get pods -n scheduling-lab -o wide
Validate Success
- The Pod is scheduled on the labeled node.
- Without the matching label, the Pod stays
Pending. - The toleration matches the taint.
Common Mistakes
- Label and affinity key do not match.
- The taint is not removed after the lab.
requiredDuringSchedulingIgnoredDuringExecutionis confused with preferred affinity.