正文
查看 所有 node 节点的调度(污点容忍度)
[root@sd-1]# kubectl describe node|grep -E "Name:|Taints:" Name: k8s-master1 Taints: node-role.kubernetes.io/master:NoSchedule Name: k8s-node1 Taints: <none> Name: k8s-node2 Taints: <none>
去除 k8s-master1 节点不允许配置的 label
kubectl taint node k8s-master1 node-role.kubernetes.io/master-
所有节点不允许调度的 label 去除
kubectl taint nodes --all node-role.kubernetes.io/master-
重新设置 master 节点不允许调度 pod
kubectl taint node k8s-master1 node-role.kubernetes.io/master=:NoSchedule
污点可选参数:
NoSchedule: 一定不能被调度
PreferNoSchedule: 尽量不要调度
NoExecute: 不仅不会调度, 还会驱逐Node上已有的Pod
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《K8s允许/禁止master节点运行pod》
文章链接: https://www.sgtms.com/shorthand/144.html
本站资源仅供个人学习交流,转载或者引用本文内容请注明来源及作者,不允许用于商业用途。
文章名称:《K8s允许/禁止master节点运行pod》
文章链接: https://www.sgtms.com/shorthand/144.html
本站资源仅供个人学习交流,转载或者引用本文内容请注明来源及作者,不允许用于商业用途。
网友评论抢沙发