Deploy MetalLB

Available since MKE 3.7.0

MetalLB is a load balancer implementation for bare metal Kubernetes clusters. It monitors for the services with the type LoadBalancer and assigns them an IP address from IP address pools that are configured in the MKE system.

Note

For information on how to install and uninstall MetalLB, refer to MetalLB load-balancer for Kubernetes.

MetalLB uses two features to provide service: Address allocation and External announcement.

Address allocation

When a service of type LoadBalancer is created in a bare-metal cluster, the external IP of the service remains in <pending> state. This is because the Kubernetes implementation for network load balancers is only supported on known IaaS platforms. To fill in this gap you can use MetalLB, which can assign the IP to the service from a custom address pool resource, which is comprised of a list of IP addresses. And administrators can add multiple pools to the cluster, thus enabling you to control which IP addresses MetalLB can assign to load-balancer services.

External announcement

After assigning an IP address to a service, MetalLB must make the network aware so that the external entities of the cluster can learn how to reach the IP. To achieve this, MetalLB uses standard protocols, depending on whether the ARP or or BGP mode is in use.

Note

When you install and configure MetalLB in MKE, support is restricted to Layer 2 (ARP) mode.