How to switch the master node in kubernetes?

Viewed 964

I have a k8s cluster with one master node (node one) and three worker nodes(node two, three, and four). Is there any way to change node two to the master node and change node one to the worker node? In other words, switch the role of node one and node two.

Thanks

1 Answers

Is there any way to change node two to the master node and change node one to the worker node?

K8s control plane (aka master) is make up of kubectl get componentstatuses. This is not like docker node promote/demote. In your case, you need to delete node 2 from the cluster, re-join the cluster as control plane. Then delete node 1 and re-join as worker node.

Related