adding master1 and master2 to load balancer in implementing HA kubernetes cluster

5/11/2018

I am exploring the implementation of CI/CD pipeline using kubernetes and jenkins. I am planned to use multi master kubernetes cluster - HA cluster. And using the etcd cluster on the master nodes. I am following the below tutorial for learning,

https://kubernetes.io/docs/setup/independent/high-availability/

Here when I am reading I found that - After Run kubeadm init on master1 and master2, there is a step "Add master1 and master2 to load balancer".

Actually I am confused in this step that , Do I need to use another VM as a load balancer ? Or master0 master1 and master2 setup defaultly giving one load balancer ?

I am not clear about this step about load balancer in HA kubernetes cluster. Can anyone clarify my confusions please?

-- Jacob
high-availability
kubernetes

1 Answer

5/11/2018

The short answer is yes, you have to create Load Balancer for masters and add other masters to LB pool manually.

Here is a part from the "Building High-Availability Clusters" document, "Replicating API Servers" section:

Load balancing
At this point, you should have 3 apiservers all working correctly. If you set up a network load balancer, you should be able to access your cluster via that load balancer, and see traffic balancing between the apiserver instances. Setting up a load balancer will depend on the specifics of your platform, for example instructions for the Google Cloud Platform can be found here.

Note, if you are using authentication, you may need to regenerate your certificate to include the IP address of the balancer, in addition to the IP addresses of the individual nodes.

For pods that you deploy into the cluster, the kubernetes service/dns name should provide a load balanced endpoint for the master automatically.

For external users of the API (e.g. the kubectl command line interface, continuous build pipelines, or other clients) you will want to configure them to talk to the external load balancer’s IP address.

Please also find two parts, related to Cloud load balancer and On Site load balancer in the Creating HA clusters with kubeadm document.
(It's hidden above "Acquire etcd cert") in "Choose one.../Cloud/On-Site" section.

-- VAS
Source: StackOverflow