<aside> 💡 When a K8s cluster is setup. A taint is automatically applied to the master node to prevent any pod from being scheduled on the master node. This is to prevent other processes from starving the master processes required to run the K8s cluster.
</aside>
NoSchedule
- do not schedule new intolerant pods on this nodePreferNoSchedule
- try not to schedule intolerant pods on this nodeNoExecute
- do not schedule intolerant pods on this node; if there are existing intolerant pods on this node, they will be evicted from the nodekubectl taint node <node-name> <key>=<value>:<taint-effect>
kubectl taint node <node-name> <key>=<value>:<taint-effect>-
k describe node <node-name> | grep Taints
The below pod definition file tolerates the taint applied to the node as:
kubectl taint node node1 compute=high:NoSchedule
apiVersion: v1
kind: Pod
metadata:
name: web-pod
spec:
tolerations:
- key: compute
operator: Equal
value: high
effect: NoSchedule
containers:
- name: nginx
image: nginx