CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Taints and Tolerations

A nodeSelector says where a Pod wants to go. A taint says who a node will accept, and the node wins. Taint a worker, watch an identical Pod stay Pending on it, then add four lines of toleration and watch it schedule.

Scheduling and Placement Guide 41 of 103 Intermediate

Written against the versions above. Node names are this lab's. Scheduler messages are quoted exactly as they appeared.

One control plane already tainted by kubeadm, three workers to experiment on.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node (tainted in this guide)2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. You already have a taint

  2. Taint a worker

  3. A Pod that asks for the node and is refused

  4. The same Pod, with a toleration

  5. Remove the taint

  6. Clean up

Official sources