Dancing with Taints: A Kubernetes Tale of Pods and Nodes
You’re orchestrating your Kubernetes cluster, pods are being deployed, and nodes are humming—it’s a symphony of efficiency. Suddenly, a rogue pod refuses to be scheduled. The harmony is disrupted, and you, the maestro, need to bring back the melody.

Yes, you’ve stumbled upon a classic Kubernetes conundrum—a pod playing hard to get due to taints and tolerations. But fret not! This is a dance many have danced, and in this blog, we’ll waltz through a step-by-step guide on how to troubleshoot and fix this issue.
What’s the Deal with Taints and Tolerations Anyway?
In the grand Kubernetes ballroom, taints are like bouncers, keeping nodes exclusive. They repel pods, ensuring only those with the right tolerations—the VIP pass—can join the party. It’s a dance of selectivity, ensuring that specific nodes only run specific pods.
Why Won’t the Pod Dance?
Don your SRE hats, folks! We’re diving into a runbook to troubleshoot and remedy this situation. We’ll focus on a demo involving a rebellious pod refusing to be scheduled.
The first step is to find out why our pod is refusing to dance. Let’s check the pod’s status and describe it to uncover any events.
Copy textkubectl get pods <pod-name>
kubectl describe pod <pod-name>
And the output? Aha! “FailedScheduling” events are glaring at us. Our pod is indeed playing hard to get!
Unmasking the Culprit: Taints!
Now that we know our pod is being selective, let’s check for any taints on the nodes that might be keeping it at bay.
Copy textkubectl describe nodes | grep Taints
Bingo! We’ve uncovered a taint on one of the nodes. It’s the reason our pod is refusing to join the dance.
Bringing Back Harmony: Remediation Time!
Bestowing the VIP Pass
A swift solution is to grant our pod the right toleration, allowing it to join the node’s exclusive party.
Here’s a snippet to add a toleration to your pod specification:
Copy texttolerations:
- key: "key"
operator: "Equal"
value: "value"
effect: "NoSchedule"
Apply the changes, and watch as the pod and node dance in harmony!
Copy textkubectl apply -f <pod-spec-file>
**Lifting the Velvet Rope **
Alternatively, if you’re feeling generous, you could lift the node’s exclusivity by removing the taint altogether. This way, all pods are welcome to the party, no VIP pass needed!
Here’s how you can remove the taint from the node:
Copy textkubectl taint nodes <node-name> key=value:NoSchedule-
With the taint lifted, our once rebellious pod is now free to join the dance along with its fellow pods!
The Grand Finale: Post-Remediation Checks
Let’s recheck our pod’s status to ensure it’s now scheduled and dancing happily with the node.
Copy textkubectl get pods <pod-name>
Voila! The pod is scheduled, and harmony is restored in our Kubernetes ballroom!
You can also watch this awesome video we made on how to solve this problem using ChatGPT:

Wrapping Up
And there you have it—a practical guide on troubleshooting and harmonizing the dance between pods and nodes in Kubernetes.
The next time your pod decides to be selective, you’ll not only bring it to the dance floor but also ensure it dances with the right partner. Whether by bestowing the VIP pass or lifting the velvet rope, harmony will prevail!
Remember, orchestrating Kubernetes is a lot like conducting a symphony: It’s all melody and harmony until someone refuses to play. Keep an eye on your resources, and you’ll keep the music playing!
Originally Published Here. Produced With Permission