Common Taint Use Cases
What you'll learn: How to apply taints strategically for dedicated nodes, specialized workloads, spot instances, and maintenance windows.
Now that you understand how taints and tolerations work mechanically, let's explore the real-world scenarios where they shine. Think of taints as "reserved parking spots" — you wouldn't reserve a handicapped space without good reason. Similarly, taints help you reserve nodes for specific purposes.
Dedicated Nodes for Specific Teams or Applications
Use taints to dedicate nodes exclusively to critical production workloads or specific teams:
kubectl taint nodes node-prod dedicated=production:NoSchedule
Only pods with the matching toleration can land on these nodes, preventing dev/test workloads from "polluting" production resources.
GPU and Special Hardware Workloads
Expensive GPU nodes shouldn't run regular web servers. Taint them to ensure only machine learning or rendering workloads that actually need GPUs get scheduled there:
kubectl taint nodes gpu-node-1 nvidia.com/gpu=present:NoSchedule
Spot/Preemptible Instance Isolation
Cloud spot instances are cheap but can be terminated anytime. Taint these nodes so only fault-tolerant, stateless workloads run there:
kubectl taint nodes spot-node-1 node.kubernetes.io/spot=true:NoSchedule
Batch jobs and non-critical services tolerate these taints; databases and APIs don't.
Node Maintenance and Draining
Before patching or upgrading a node, apply a NoExecute taint to gracefully evict existing pods while preventing new scheduling:
kubectl taint nodes node-1 maintenance=true:NoExecute
Pods without the toleration evacuate immediately (or after tolerationSeconds), allowing safe maintenance.
Key Takeaway: Taints solve real operational challenges — reserving expensive hardware, isolating unreliable infrastructure, protecting production environments, and enabling graceful maintenance windows without manual pod deletion.