Overview
In this document, we will ensure our existing Kubernetes cluster works with high availability along with uninterrupted service by routing to virtual IP without breaking it. Existing Machines:- Kubernetes Master1
- Kubernetes Master2
- Kubernetes Master3
- Kubernetes Worker1
- Kubernetes Worker2
Existing System and Virtual IP Access
In the existing system, a Kubernetes cluster started with kubeadm init command on Master1 was created and then other machines (Master2, Master3, Worker1, and Worker2) were included in this cluster with worker role. By defining a Virtual IP on Load Balancer, we need to access existing machines to this Virtual IP from 6443 port.IP Change
When there are multiple master nodes in the cluster, we need to reconfigure the cluster to leave these masters as a single master. This operation usually starts by completely removing other masters from the cluster.Removing Master Nodes from Cluster
The following command is run for other masters (master2 and master3) except master1.Master1 and worker servers should remain in the existing system.
Tasks to be Done on Master1 Server
1
Stopping ServicesKubelet and containerd (and docker application if docker is used) are stopped.
2
File Backup and CleaningBackups of some files are taken and deleted.
3
Starting ContainerdContainerd (and docker application if docker is used) is started.
4
Virtual IP Configuration with Kubeadm InitKubeadm init command is run again by editing endpoint address and used as Virtual IP.
Tasks for Worker1 and Worker2
1
Stopping ServicesKubelet and containerd (and docker application if docker is used) are stopped.
2
File BackupBackups of some files are taken.
3
Starting ServicesContainerd (and docker application if docker is used) and kubelet are started.
4
Worker JoinKubeadm worker join command is run on worker1 and worker2 machines.

