BareMetal LoadBalancer for Kubernetes using MetalLB

In this post i’ll show how to install and use MetalLB l2 loadbalancer for Kubernetes.

If you’re not using AWS,GKE or AKS you cannot passed over to pending state on LoadBalancer service on Kubernetes. MetalLB is tool to achive this and create a loadbalancer for your baremetal Kubernetes by supporting BorderGatewayProtocol and L2.

First of all i created DigitalOcean droplet on Frankfurt with 2G ram and installed Kubeadm.
MetalLB installation yaml firstly create namespace for metallb and creating and applying rbac for namespace.
After applying yaml we should check our pods and services to running without any errors.

Speaker sends arp requests and getting ip addresses for lb. Controller is allocate ip address to loadbalancer service for kubernetes.

Last step is we should give a config to metallb. In this config we define which protocol and which ip addresses will be use for service.

Im using kubeadm to creating this example. Only have 1 node and i want to publish to node ip address.
So what im going to do is giving 1 host cidr. “/32”

After applying it we can dig our speaker logs.

Our kubectl get svc is looks awesome

Service panel :

Trying out:

This entry was posted in Kubernetes and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply