Hands-on Lab·Certified Kubernetes Administrator
LoadBalancer Services on Bare Metal with MetalLB
A LoadBalancer Service off-cloud sits at Pending forever, because nothing is listening for it. MetalLB is the thing that listens: it hands out addresses from a pool and answers ARP for them from one node.
Services and Networking Guide 63 of 103 Intermediate
- Kubernetes1.36.4
- MetalLBv0.15.2
- ModeL2Advertisement
- Cluster4 nodes
- TimeAbout 40 min
- Reviewed21 August 2026
Written against the versions above. L2 mode, which needs only a free range on the node subnet. BGP mode needs a router that will peer, and behaves quite differently.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
Before you start
- The Services guide, particularly the ClusterIP, NodePort and LoadBalancer types.
- A free range of addresses on the node subnet, outside any DHCP scope.
- Layer 2 reachability between the nodes, which L2 mode requires.
-
The Pending that never resolves
-
Install MetalLB: a controller and a speaker on every node
-
Installed and still Pending, which is the point
-
A pool and an advertisement, and the address appears
-
It answers, and one node is answering for it
-
Allocation: sequential, requested, refused, exhausted