k8s在master节点上调度pod

发布时间 2023-11-04 04:15:37作者: 秋刀鱼006

默认情况下,出于安全原因,集群不会在Master节点上调度 Pod。 如果你希望能够在Master节点上调度Pod,请运行:

kubectl taint nodes --all node-role.kubernetes.io/control-plane-

输出如下:

node "test-01" untainted
taint "node-role.kubernetes.io/master:" not found
taint "node-role.kubernetes.io/master:" not found

这将从任何拥有 node-role.kubernetes.io/master taint 标记的节点中移除该标记, 包括控制平面节点,这意味着调度程序将能够在任何地方调度 Pods。