I am running MetalLB load balancer on my Kubernetes cluster in L2 mode (BGP mode is out of question).
In L2 mode, a given K8s service gets exposed via a single MetalLB speaker process running on a particular cluster node.
Assuming I have two distinct K8s services and I’d like to make sure that their MetalLB speakers land on different nodes (to shone the network bandwidth of the node and isolate “noisy neighbours”).
Is it possible to configure MetalLB to ensure which speaker, and hence Kubernetes node, the service will be exposed on?
If I would use several distinct K8s node pools and enabled MetalLb on all of them, they would all join the same L2 network domain and even by assigning my K8s services to different node pools I wouldn’t be able to ensure which MetalLB speaker picks which of my services.
MetalLB speakers use the leader election algorithm to determine which speaker/node will expose the given service. The public documentation doesn’t go into details of this algorithm. Maybe there is a way to ensure that 2 services do not land on the same node by utilizing certain naming conventions? (or there are annotations that I’m overlooking)