MetalLB

About

MetalLB is a Kubernetes-aware solution that will monitor for services with the type LoadBalancer and assign them an IP address from a virtual pool.

It uses BGP(Border Gateway Protocol) or ARP(Address Resolution Protocol) to expose services.

MetalLB has support for local traffic, meaning that the machine that receives the data will be the machine that services the request. It is not suggested to use a virtual IP with high traffic workloads because only one machine will receive the traffic for a service - the other machines are solely used for failover.

BGP does not have this limitation but does see nodes as the atomic unit. This means if the service is running on two of five nodes then only those two nodes will receive traffic, but they will each receive 50% of the traffic even if one of the nodes has three pods and the other only has one pod running on it. It is recommended to use node anti-affinity to prevent Kubernetes pods from stacking on a single node.

Note: For more information on configuring MetalLB with Calico in BGP mode, please see this explanation of the required configuration from the MetalLB website

Currently, the best way to install MetalLB on Charmed Kubernetes is with a helm chart:

helm install --name metallb stable/metallb

Further configuration can be performed by using a MetalLB configmap.

We appreciate your feedback on the documentation. You can edit this page or file a bug here.