KubeDojo

Taints, Tolerations, and Node Affinity

AK
by Alexis Kinsella··16 min read
Taints, Tolerations, and Node Affinity

You kubectl apply a GPU training job and it sits Pending for 20 minutes. kubectl describe shows "0/8 nodes are available: 4 node(s) had untolerated taint, 4 node(s) didn't match node affinity." You have GPU nodes. They're idle. But the scheduler won't touch them because the scheduling constraints don't line up.

Kubernetes provides three complementary tools for controlling pod placement: taints repel pods from nodes, tolerations let specific pods override that repulsion, and node affinity attracts pods toward nodes matching label criteria. Used together, they give you precise control over where workloads land. This matters in production (dedicated node pools, hardware isolation, zone spreading) and on the CKAD exam, where scheduling falls under the Application Design and Build domain (20%).

Sign in to access this lesson

Create a free account or sign in to enroll in the CKAD — Certified Kubernetes Application Developer course and access all 44 lessons.

CKAD — Certified Kubernetes Application Developer

44 lessons

Browse the full course curriculum →