一、查看当前五点状态
# kubectl describe node | grep Taints
二、设置五点禁止调度,同事进行驱赶现有pod
# kubectl taint nodes k8s-master01 key1=value1:NoExecute # kubectl taint nodes k8s-master02 key1=value1:NoExecute # kubectl taint nodes k8s-master03 key1=value1:NoExecute
三、取消污点
# kubectl taint nodes k8s-master01 key1=value1:NoExecute-
# kubectl taint nodes k8s-master02 key1=value1:NoExecute-
# kubectl taint nodes k8s-master03 key1=value1:NoExecute-
四、设置五点,禁止调度,不进行驱赶现有pod
# kubectl taint nodes k8s-master01 key1=value1:NoSchedule # kubectl taint nodes k8s-master02 key1=value1:NoSchedule # kubectl taint nodes k8s-master03 key1=value1:NoSchedule
五、取消污点
# kubectl taint nodes k8s-master01 key1=value1:NoSchedule- # kubectl taint nodes k8s-master02 key1=value1:NoSchedule- # kubectl taint nodes k8s-master03 key1=value1:NoSchedule-