LoadBalancer in an on-premises cluster (where cloud-managed load balancers are not available).

Scenario
- Cluster runs on-premises (not on AWS/EKS/AKS).
- No external load-balancer controller (e.g., MetalLB) is installed.
- We have two sample deployments and corresponding Services; one Service is
LoadBalancertype and will initially showEXTERNAL-IPas<pending>.
Verify current Services
Check Services before deploying the sample apps:Apply the sample Deployment and Services
Apply the manifest that creates two applications (myapp and myapp2) and their Services:
myapp-service is LoadBalancer type but its EXTERNAL-IP remains <pending> because no external IP provider exists in this on-prem cluster:
Provide external IPs with CiliumLoadBalancerIPPool
Instead of installing a separate external load balancer solution (for example, MetalLB), Cilium can allocate external IP addresses forLoadBalancer Services using a CiliumLoadBalancerIPPool resource.
Create a file named lb-ipam.yaml with the IP block you want Cilium to manage. Example:
- The
blocksrange specifies the pool of external IPs that Cilium can allocate. - Optionally use
serviceSelectorto limit assignments to Services with specific labels.
myapp-service now has EXTERNAL-IP assigned (172.19.255.1), taken from the configured pool. Subsequent LoadBalancer Services will receive .2, .3, etc., up to the stop address.
Cilium will allocate the EXTERNAL-IP from the pool, but you must ensure the cluster network and upstream routers/switches can route or reach those addresses. Typical methods include L2 advertisement (ARP/NDP) or BGP announcements so external clients can reach the assigned IPs.
If the assigned IPs are not reachable from your network, traffic to the external IP will fail—even though Kubernetes and Cilium show the IP as assigned. Configure ARP/NDP or BGP on your network infrastructure or use an appropriate routing/advertisement mechanism.
Quick reference
| Resource | Purpose | Example / Notes |
|---|---|---|
| CiliumLoadBalancerIPPool | Defines a pool of external IP addresses for Cilium to allocate to Services of type LoadBalancer | YAML example shown above |
| Service (LoadBalancer) | Requests an external IP to expose the Service outside the cluster | kubectl get svc shows EXTERNAL-IP populated by Cilium |
| MetalLB | Alternative open-source load balancer for on-prem clusters | https://metallb.universe.tf/ |
Useful links and further reading
- Cilium documentation: https://docs.cilium.io/
- MetalLB: https://metallb.universe.tf/
LoadBalancer Services (optionally scoped by label selectors).