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-

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

禁止master部署pod

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

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

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

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

相关文章:

  • 2021-09-23
  • 2021-07-18
  • 2021-08-18
  • 2021-09-18
  • 2021-11-10
  • 2021-08-22
  • 2021-11-25
  • 2021-09-04
猜你喜欢
  • 2021-10-05
  • 2022-12-23
  • 2021-11-18
  • 2021-11-27
  • 2022-12-23
  • 2021-07-30
  • 2022-01-29
相关资源
相似解决方案