How to create HA cluster after having created a single control-pane with kubeadm?

Hi everyone!

I have installed a kubernetes cluster with one control pane (1 etcd / master) and 3 worker nodes with the kubeadm procedure: Creating a single control-plane cluster with kubeadm - Kubernetes

   root@pi0:~# kubectl get nodes          
pi0    Ready    master   19d   v1.15.3 
pi1    Ready    <none>   12d   v1.15.3 
pi2    Ready    <none>   19d   v1.15.3 
pi3    Ready    <none>   19d   v1.15.3 

Would you have some procedure to convert my cluster to a HA cluster? I hope to move the kube api to a haproxy load balancer, then create other masters, but I’m overwhelmed by the documentation and dont know where to start without breaking my cluster.

Does somebody could guide me to a correct procedure?

Thanks in advance!

1 Like

-> #general-discussions

Does simply running kubeadm join in control plane node mode - with all the nodes still believing there’s a single master for now - not work?

This (single-master to multi-master upgrade) also feels like something that should be covered in e2e tests. (sig-cluster-lifecycle)

Thanks I will try it later :slight_smile: But how / where would I define the new IP address for the kube api?

I would like to use a load balancer like haproxy that serves the api in frontend, and using all master nodes as backend.

If you are planning to move from a single master to multi master cluster, it is better to create a new multi master cluster and migrate your workloads to new cluster.

If you want to convert a single master cluster to multi master

  • Create a Load Balancer.
  • Update the API server certificate accordingly(the new control plane endpoint is LB IP or dns)
  • Update Kubelet and other Control Plane components.
    - /etc/kubernetes/kubelet.conf
    - /etc/kubernetes/controller-manager.conf
    - /etc/kubernetes/scheduler.conf
    Modify server: field of above files to point to LB
  • Restart controller-manager and scheduler
  • Update worker nodes (Kubelet) .
  • Add new control plane nodes.