k8s 1 node(s) had taints that the pod didn't tolerate

kubernetes增加污点,达到pod是否能在做节点运行

master node参与工作负载 (只在主节点执行)
使用kubeadm初始化的集群,出于安全考虑Pod不会被调度到Master Node上,也就是说Master Node不参与工作负载。

这里搭建的是测试环境可以使用下面的命令使Master Node参与工作负载:
k8smaster节点的hostname

允许master节点部署pod,使用命令如下:

kubectl taint nodes --all node-role.kubernetes.io/master-

禁止master部署pod

kubectl taint nodes k8s node-role.kubernetes.io/master=true:NoSchedule

输出error: taint “node-role.kubernetes.io/master:” not found错误忽略。

转载1 node(s) had taints that the pod didn't tolerate

posted @ 2020-05-06 14:50  if年少有为  阅读(3610)  评论(0编辑  收藏  举报