Forum Navigation
You need to log in to create posts and topics.

Add Taint Node to Master

Problem 

User removed taint mode from the master using the following command

kubectl taint nodes iac-k8s-rp-ld0 node-role.kubernetes.io/master-

and wants to adds it back so pods will not schedule on the master

run the following command to taint the master  node

kubectl taint nodes <NODE NAME> node-role.kubernetes.io/master:NoSchedule

 

additional settings may be required to apply

kubectl taint nodes <NODENAME> key1=value1:NoSchedule

kubectl taint nodes <NODENAME> key1=value1:NoExecute

kubectl taint nodes <NODENAME> key2=value1:PreferNoSchedule

kubectl taint node il-dte-p1 node-type=production:NoSchedule

kubectl taint nodes il-dte-p1 node-role.kubernetes.io/control-plane:NoSchedule