Skip to main content

7. Scheduling: selectors, affinity, taints & tolerations

How Pods land on nodes; nodeSelector, affinity/anti-affinity, taints, tolerations, cordon/drain.

⏱ ≈ 30 min this module · 📚 ≈ 6.9 h full track

🔒 Unlock this course to read the material and run the labs.

See options to unlock →
🔒 The written material unlocks with the course.
🧪 Hands-on lab Hard · 180 XP · 30min

Goal

Label the node, then schedule a Pod that tolerates a taint and targets the node via nodeSelector.

Requirements

  • Add label tier=frontend to the node (find it: kubectl get nodes)
  • Taint the node dedicated=frontend:NoSchedule
  • A Pod web (image nginx:1.25) with a matching toleration and nodeSelector: {tier: frontend} that reaches Running

A Pod with no toleration would stay Pending — prove yours schedules.

🔒 Unlock the course to run this lab.