简体   繁体   中英

How to schedule pods on Kubernetes master?

In my Kube.netes cluster, I have 3 worker node and 1 master node. I have removed the taint on the master node so the k8s can schedule pods on that node.

在此处输入图像描述

Now, I want to change 2 of 3 workers to master and control-plane (can schedule pods on these nodes)node by using the following:

kubectl label nodes node1 kubernetes.io/role=master
kubectl label nodes node1 kubernetes.io/role=control-plane
kubectl label nodes node2 kubernetes.io/role=master
kubectl label nodes node2 kubernetes.io/role=control-plane
kubectl taint node --all node-role.kubernetes.io/master:NoSchedule-

I wonder if those pods in node1(for example) would stop after I run kubectl label nodes ?

Use the below command to schedule pods on the master nodes

kubectl taint node <master-node> node-role.kubernetes.io/control-plane:NoSchedule-

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM