MetalLB provides load-balancing for Kubernetes clusters such as kind, allowing a LoadBalancer Service to receive an externally reachable IP without an integrated cloud load balancer. section 5.3.1 section 6.4.3
Deploy and configure MetalLB as an operational workflow:
- Install the chart with helm install metallb metallb/metallb --values values.yaml; the values file configures chart parameters in YAML. section 5.3.1
- Configure an IPAddressPool and L2Advertisement, using an address range that matches the node network’s address prefix. section 6.4.3
- Expose an application by changing its Service type to LoadBalancer, then inspect EXTERNAL-IP with kubectl get svc. section 6.4.3
Expose Apache through MetalLB
After configuring the pool 172.18.255.1-172.18.255.50 and applying the layer-2 resources, apache-svc reports type LoadBalancer and EXTERNAL-IP 172.18.255.1. Running curl 172.18.255.1 returns the Apache response.
