This site has been generated and deployed from Github repository tjtharrison/

Tim Harrison

DevSecOps Team Lead

Kubernetes Installing MetalLB for a Bare Metal Kubernetes Load Balancer

MetalLB ([] is a great tool for installation on a bare metal Kubernetes Cluster to allow You to use Load Balancer yamls in Your dev environment before Your project is deployed to a Cloud Hosted service such as AWS (Which handle Load Balancers for You).


First – Apply the full Yaml from MetalLB repository:

kubectl apply -f

Once this deployment has completed, You should generate a configMap.yaml for Your Kubernetes Cluster. This should be updated with a range of IP addresses on Your subnet that can be assigned by MetalLB (Eg outside of Your DHCP range / not in use by other servers).

apiVersion: v1
kind: ConfigMap
  namespace: metallb-system
  name: config
  config: | 
    - name: default
      protocol: layer2

Apply this Yaml File and You will be able to create Load Balancer service types on Your cluster – To access the Load Balancers, after applying check kubectl get svc for the IP address allocated to your Balancer.