Add Taint Node to Master
Quote from moshe on 02/08/2022, 6:58 pmProblem
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
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
Quote from Moshe Sharon on 07/04/2024, 3:24 pmkubectl taint node il-dte-p1 node-type=production:NoSchedule
kubectl taint nodes il-dte-p1 node-role.kubernetes.io/control-plane:NoSchedule
kubectl taint node il-dte-p1 node-type=production:NoSchedule
kubectl taint nodes il-dte-p1 node-role.kubernetes.io/control-plane:NoSchedule