Explains Cilium LoadBalancer IPAM, configuring IP pools, allocating external IPs for LoadBalancer Services, and methods to advertise or route those IPs to the cluster
In this lesson we cover Cilium’s LoadBalancer IPAM: how Cilium can allocate external IP addresses for Kubernetes LoadBalancer Services and how to make those IPs reachable from your network.Why this matters
In cloud providers (for example, EKS on AWS) creating a Service of type LoadBalancer usually triggers the cloud provider to provision a load balancer and return an external IP or DNS name (for example, an AWS ELB DNS entry).
On-premise clusters typically use components like MetalLB to provide external IPs.
Cilium’s LoadBalancer IPAM eliminates the need for separate tooling by allocating external IPs directly from configured pools and exposing them as the Service EXTERNAL-IP.
How it looks in Kubernetes
When Cilium assigns an external IP to a Service, it appears in the Service listing:
Copy
user1@control-plane:~$ kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEkubernetes ClusterIP 10.96.0.1 <none> 443/TCP 36dmyapp-service LoadBalancer 10.98.13.153 10.0.10.1 80:30699/TCP 170m
Traffic sent to that EXTERNAL-IP will be routed to the Service and then to the pods backing it, provided the network fabric advertises or forwards that IP to the cluster.How to configure LoadBalancer IPAM (CiliumLoadBalancerIPPool)
Create a Cilium custom resource of kind CiliumLoadBalancerIPPool describing the address ranges Cilium can use and optional selectors that control which Services may receive external IPs.Example manifest:
apiVersion / kind / metadata.name: standard Kubernetes CR metadata.
spec.blocks: one or more blocks from which external IPs are allocated.
spec.serviceSelector: (optional) restricts allocation to Services matching the provided labels.
Types of blocks supported
Block type
Description
Example
CIDR
A CIDR range (IPv4 or IPv6) from which Cilium will allocate IPs
cidr: "10.0.10.0/24"
Start/Stop range
An explicit sequential range between two addresses
start: "20.0.20.100", stop: "20.0.20.200"
Single IP
A start-only entry to represent a single IP
start: "1.2.3.4"
Service selector behavior
If you include spec.serviceSelector, only Services that match those labels will be eligible for external IP allocation from this pool.
In the example above, only Services labeled color: red will be assigned IPs from blue-pool.
Making the allocated external IPs reachable
Allocating an IP on the Service resource is only half the job — you must ensure external routing/forwarding directs traffic for those IPs to the cluster nodes. Common methods:
Mechanism
When to use
Notes
BGP advertisements
Data center or network fabric supports BGP peering
Use a BGP speaker to advertise pool prefixes to upstream routers
L2 announcements (ARP/NDP)
Simple L2 networks or when BGP is not available
Cluster nodes respond to neighbor discovery for allocated IPs
Static routing (network config)
Small deployments or lab environments
Add static routes pointing to cluster nodes or load balancer devices
Important: you must ensure that external routing/forwarding is configured so traffic destined to those allocated external IPs actually reaches your cluster. Common ways to advertise or make those routes reachable include:
BGP advertisements from the cluster (peering with a router or BGP speaker).
L2 (ARP/NDP) announcements so the cluster responds to neighbor discovery for the IPs.
BGP and other advertisement mechanisms are commonly used to advertise those allocated external IPs to the wider network so they become reachable.
When creating pools, include only ranges that your network fabric can actually route to the cluster. Otherwise external traffic won’t reach the assigned IPs even though Services will show the EXTERNAL-IP.