Load Balancing Apps on Bare Metal Multi-master Kubernetes Clusters

On-premise Platform9 Managed Kubernetes supports multi-master implementation for high availability.

Additionally, the apps running on multi-master Kubernetes clusters can be load balanced with the help of metalLB.

Virtual IP Addressing with VRRP

Platform9 Managed Kubernetes uses the Virtual Router Redundancy Protocol (VRRP) with Keepalived to provide a virtual IP (VIP) that fronts the active master node in a multi-master Kubernetes cluster. At any point in time, the VRRP protocol associates one of the master nodes with the virtual IP to which the clients (kubelet, users) connect to.

The virtual IP must be bound to a specific physical interface on the master node. The label for the physical interface, such as eth0, for example, must be provided by the user while creating the multi-master Kubernetes cluster.

Ensure that the virtual IP is reachable from the network this interface connects to and that all master nodes use the same interface that the virtual IP will be bound to.

Multi-master cluster

If the active master node goes down, the virtual IP is seamlessly associated with one of the remaining master nodes. The master node that associates with the virtual IP, now becomes the active master node.

Load Balancing with MetalLB

MetalLB is a network load balancer implementation for Kubernetes using standard routing protocols. MetalLB is deployed as a Kubernetes app within the cluster. Given a pool of IPs, MetalLB allocates IPs for providing north-south connectivity to Kubernetes apps via the service type “LoadBalancer” object. For more information, refer to the MetalLB website.

Steps to perform for App Load Balancing

The following steps must be performed to be able to load balance apps on a multi-master cluster.

  1. Install MetalLB.
  2. Install Keepalived.
  3. Allocate an address pool for VRRP virtual IP addressing.

Once this is done, you can create a multi-master cluster through Platform9 Clarity UI or by invoking the respective Platform9 Managed Kubernetes API to create cluster. Refer to the API documentation that can be accessed through Platform9 Clarity UI for details on API calls.


June 27, 2018