k8s master节点去除污点和增加
k8s master节点去除污点和增加
·
1.k8s集群什么时候需要对master节点去除污点?怎么去除污点
新建k8s的集群,master 默认是有污点的,pod 不能部署在master节点,但是对于本地测试,机器有限的情况下,只有一台机器,可以使用去除master污点,使用一台机器部署k8s集群。去除master节点如下
kubectl taint nodes fugw002-host002 node-role.kubernetes.io/master:NoSchedule-
-代表去除
NoSchedule: 一定不能被调度
PreferNoSchedule: 尽量不要调度
NoExecute: 不仅不会调度, 还会驱逐Node上已有的Pod
2.k8s 怎样对master节点增加污点?
kubectl taint nodes m1 node-role.kubernetes.io/master=:NoSchedule
更多推荐
已为社区贡献2条内容
所有评论(0)