MetalLB Configuration in Minikube — To enable Kubernetes service of type “LoadBalancer”

So far in minikube there is no default implementation of network load-balancer. Load-balancer will remain in the “pending” state indefinitely when created. Minikube Version 1.10.0-beta.2 has a new powerful addon i.e. MetalLB. MetalLB had addressed the gap and provides the network LoadBalancer implementation as an addon.
Public cloud providers will assign the IP for the load balancer, whereas on bare metal MetalLB is responsible for the allocation of the IP Address.
Let’s see as how we can enable the same in minikube and configure the same with an example.
minikube addons list will show that metalLB is disabled.

Enable the addon using the command minikube addons enable metallb

Once the addon is enabled, we can see that there are two components that are up and running in the cluster under metallb-system namespace. Controller and Speaker are those two components.

The controller helps in the IP address assignment, whereas the speaker advertises layer -2 address.
As we have enabled the addon, now we have to configure the same for the addon to come into effect. We have to configure using the following command minikube addons configure metallb .
It will prompt for the IP Address range. As my minikube host IP is 192.168.99.100, I have given the range as below


Check the configuration which is stored in a config map, kubectl describe configmap config -n metallb-system

Now let’s try to create the deployment and expose the same using LoadBalancer. As we have got MetalLB configured, we can see the External IP address populated from the IP pool.








