Master tainted - no pods can be deployed

Mchoeti picture Mchoeti · May 16, 2019 · Viewed 7.9k times · Source

In my Kubernetes Dashboard i see, that one node has the Label

node-role.kubernetes.io/master:  

The result is, that all my pods are deployed on the cluster except this node. ( When i increase the replica no pod will be deployed on the master node) How can i remove the label, i tried the Kubernetes Trouble Shooting Guide

Following commands did not succeed

kubectl taint nodes --all node-role.kubernetes.io/master:-
kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl taint nodes --all node-role.kubernetes.io/master:NoSchedule-

both of them resulted in the message (snip)

taint "node-role.kubernetes.io/master:" not found
taint "node-role.kubernetes.io/master:" not found
taint "node-role.kubernetes.io/master:NoSchedule" not found

Expected output should be:

  • Pods should be deployed on each of the nodes (including the Master)

My Version is v1.14.1

Answer

Dashrath Mundkar picture Dashrath Mundkar · May 14, 2020

First check the taint present or not with nodename

kubectl describe node <nodename> | grep Taints

and you will get something like this (master or worker_node)

node-role.kubernetes.io/master:NoSchedule

To remove taint from node just run like this (here in my case it is master node)

kubectl taint node master node-role.kubernetes.io/master:NoSchedule-

Make sure you add - infront of NoSchedule