In this training course, we will use taints and tolerations to influence scheduling.
Navigate to the folder
22_taints-and-tolerations
from CLI, before you get started.
kubectl taint nodes <NODE-NAME> foo=bar:NoSchedule
kubectl get nodes -o=custom-columns='NODE_NAME:metadata.name,TAINTS:spec.taints[*]'
cat deployment.yaml
kubectl create -f deployment.yaml
kubectl get pods -o=custom-columns='POD_NAME:metadata.name,NODE_NAME:spec.nodeName'
cat pod.yaml
kubectl create -f pod.yaml
kubectl get pods -o=custom-columns='POD_NAME:metadata.name,NODE_NAME:spec.nodeName'
kubectl delete pod my-pod
kubectl delete deployment my-deployment
kubectl taint nodes <NODE-NAME> foo=bar:NoSchedule-