Why bare metal Kubernetes needs MetalLB for LoadBalancer Services
On a cluster running on servers or VMware, a Service of type LoadBalancer will sit with its external IP in a pending state, because nothing in the cluster knows how to hand out addresses from your network. Cloud providers supply that piece through their own controllers. On your own hardware, someone has to supply it, and MetalLB is the open-source component most teams use for that job. Before you install anything, confirm that the address ranges you plan to give the cluster belong to your network team and are not already used by DHCP, existing hosts or other load balancers.
MetalLB, as its documentation describes it, assigns external IP addresses to LoadBalancer Services from address pools you configure, then announces those addresses to your network either through layer 2 (ARP or NDP) or through BGP peering with your routers. The announcement method is the decision that matters most, so treat it as an architecture choice rather than a default to accept. A NodePort Service only exposes a high port on every node, which suits testing or a single externally reached service but gives clients no stable virtual IP. An ingress controller routes HTTP and HTTPS by hostname and path, but it still needs an address to be reachable, so it usually sits behind a LoadBalancer Service.
That layering is why MetalLB is needed in most bare metal designs that serve traffic from outside the cluster: the ingress controller or a non-HTTP service gets a stable address, and the ingress controller handles the routing above it. If all your traffic is internal to the cluster, ClusterIP Services may be enough and you may not need MetalLB at all. Confirm which services must be reachable from outside, which protocols they use and who in your organization owns the routers that will learn or accept the addresses before you decide on a design.
How a MetalLB address reaches a client
The flow starts when a Service of type LoadBalancer requests an address, and MetalLB's controller assigns one from a configured pool. A speaker on a node then announces that address to the network, either by answering ARP or NDP requests in layer 2 mode or by advertising a route over BGP. Client traffic crosses the trust boundary into the network team's routers and switches, reaches the elected or advertising node, and is forwarded by kube-proxy to a pod. Check which node answers for the address and that the pool and announcement settings match what the network team expects.
Address assignment, announcement and client traffic path across the cluster boundary.
Layer 2 mode versus BGP mode: which fits which network
This table compares layer 2 and BGP announcement for MetalLB across network requirements, failover, traffic concentration and router work. Read each row against your own network team's constraints, then use the last row to decide which mode to scope first.
| Factor | Layer 2 mode | BGP mode |
|---|---|---|
| Network requirement | Service IPs must sit in the same layer 2 subnet as the nodes that announce them | Routers must peer with the cluster nodes, and service IPs can be routed beyond the local subnet |
| Router configuration | No router changes are normally needed beyond the subnet already existing | Network team must configure BGP peers, autonomous system numbers and route filters on routers |
| Traffic concentration | One node answers for each service IP, so all inbound traffic for that IP lands on one node | Traffic can be spread across several announcing nodes through equal-cost routes, if the router supports multipath |
| Failover behavior | Another node takes over after the announcing node fails, but clients may see a delay while neighbor caches update | Routes are withdrawn when a session drops, and failover depends on BGP timers and router convergence |
| Address pool fit | Works with automatic assignment and shared IPs in one subnet, which suits small or flat networks | Suits per-namespace or dedicated pools that the network team has routed to the cluster |
| Operational visibility | Current owner of each IP is found by checking which node answers ARP, which is harder to audit at scale | Route tables on routers show which nodes advertise each service address |
| Best fit | Lab, small clusters, or flat networks where the network team cannot change routing | Production clusters with multiple nodes, routed address space and a network team that will own peering |
| Confirm before choosing | Check your address plan, ARP behavior on switches and whether clients sit on other subnets | Confirm peering configuration fields and BFD options against the MetalLB documentation for your version |
How failover works in layer 2 mode and where it falls short
In layer 2 mode, one node answers ARP (or NDP) requests for each LoadBalancer IP at a time, so every inbound packet for that address arrives at the same node, and that node's kube-proxy hands traffic on to the pods behind the Service. The other nodes do not share the load for that IP. Adding nodes or replicas does not spread a single Service's traffic across the cluster at the network layer. Before go-live, the platform team should confirm which node currently owns each address (MetalLB exposes this through its Service events and status) and plan capacity on the assumption that one node carries the full inbound flow for that IP.
When the owning node fails or is drained, MetalLB elects another node and that node sends gratuitous ARP announcements. Recovery time is not set by MetalLB alone. Client operating systems, routers and any load balancers in front of the cluster keep ARP cache entries for the old MAC address until those entries expire or are refreshed, and switches may keep forwarding frames to the old port until their MAC address tables age out. Some clients ignore unsolicited ARP replies altogether. The network team should confirm the ARP timers and MAC aging settings on the switches and firewalls that front the pool, and test failover from the client subnets that matter most, not only from a lab host on the same segment.
BGP mode behaves differently in one important way: where the upstream routers accept multiple equal-cost paths, traffic for a LoadBalancer IP can be spread across several nodes through ECMP, and failure of one peer withdraws only its paths. Whether that spread happens depends on router support for ECMP and on the hashing the routers apply, so the networking team must confirm both before planning capacity around it. Until that confirmation is in writing, treat layer 2 as a single-node-per-address design and size each node accordingly. The MetalLB documentation covers the mode-specific behavior in more detail.
Setting up MetalLB address pools and announcements
This sequence moves a bare metal cluster from agreed network ranges to a Service that answers with an external IP on the target VLAN. Each step names the owner and the check that confirms it is complete.
Confirm free address ranges with the network team
Before touching the cluster, agree in writing which IPv4 ranges MetalLB may hand out. The network team confirms the range sits in a VLAN the cluster nodes can reach, is not part of any DHCP scope or static assignment, and is not used by a firewall or NAT rule. For layer 2 mode, the range must sit on the same broadcast domain as the nodes. For BGP, the team also confirms the peer addresses, autonomous system numbers and which prefixes the routers will accept. Done when the team returns the ranges and peer details in writing.
Check cluster networking prerequisites and kube-proxy mode
Review the MetalLB documentation for the release you intend to install and compare it with your cluster. Confirm the CNI plugin, the kube-proxy mode (iptables, IPVS or a replacement), and whether strictARP must be enabled when kube-proxy runs in IPVS mode. Check that node firewalls allow the speaker traffic MetalLB needs for leader election and, for BGP, the BGP session port. Done when you have a written list of settings to change and a record of the current kube-proxy configuration, so the team can confirm nothing else is changed later.
Mirror MetalLB images into a private registry
If the cluster has no internet access, copy the MetalLB controller and speaker images, and any tooling images your install method needs, into the private registry the cluster already pulls from. Pin each image to the tag or digest your change record names. The kubeadm guidance on pulling images and setting an image repository applies to the cluster's own control plane images, so keep the MetalLB images on the same registry governance. Done when every image referenced by the manifests or Helm chart resolves from the internal registry on a test node.
Install MetalLB and confirm its pods are ready
Install MetalLB from the manifests or Helm chart you have reviewed, pointing image references at the private registry where needed. Wait for the controller and speaker pods to reach a ready state on every node selected for announcements. Check the logs for errors about webhook certificates or failed leader election. Done when the controller deployment and all speaker pods report ready, and no pod is in a crash loop.
Define IPAddressPool resources
Create one or more IPAddressPool resources that list the ranges from the first step. Use a clear name for each pool, such as one per VLAN or purpose, and avoid overlapping ranges across pools. Add the address ranges only, not individual addresses reserved for other systems, and set autoAssign to false on any pool that should be used only when a Service requests it by annotation. Done when
kubectl get ipaddresspools -n metallb-systemlists each pool and the ranges match the approved list exactly.Create L2Advertisement or BGP announcement resources
For layer 2 mode, create an L2Advertisement that references the pools and, if needed, limits announcements to specific nodes or interfaces. For BGP, create BGPPeer resources with the router addresses and autonomous system numbers, then a BGPAdvertisement that links the pools and sets the communities or aggregation the network team agreed. Only one announcement method should cover a given pool unless you have documented why both apply. Done when the speaker logs show the layer 2 announcement or established BGP sessions, and the network team confirms the routes or ARP entries they see.
Verify a test Service from the target VLAN
Create a test Service of type LoadBalancer with a simple HTTP responder, then confirm it receives an external IP from the expected pool. From a client machine on the target VLAN, request the address and check the response. For layer 2 mode, check the ARP table on the client and confirm the owning node changes if you drain the announcing node. For BGP, check the route on the upstream router. Done when the client gets a response from the external IP, and the result is recorded with the test Service name, pool and announcing node. Remove the test Service once the record is saved.
What the network team must provide before go-live
MetalLB only works when the network team has reserved addresses, placed node interfaces correctly and agreed how service IPs will be announced. Each card below is a separate input to settle before the first Service receives an external address, and each one is easier to fix on paper than after traffic is flowing.
An owned, reserved address range
Ask for a dedicated block of addresses that is excluded from DHCP scopes, static assignment lists and any other device's configuration. MetalLB hands these addresses to LoadBalancer Services, so a single collision with a printer, hypervisor or laptop produces intermittent, hard-to-trace failures. Confirm the block is routable or reachable from the clients that will use the services, and record who owns changes to it in the IP address management system.
VLAN and subnet placement
Node interfaces that carry service traffic must sit in a subnet the announced addresses can reach. In layer 2 mode, the service addresses share the node subnet, so the network team must confirm which VLAN the worker NICs use and that all nodes can see each other on it. Check whether control plane and worker traffic are separated, and whether a bonded interface or trunk changes which interface MetalLB uses to answer.
BGP ASN, peers and routing policy
For BGP mode, the team needs a private or assigned autonomous system number for the cluster, the peer addresses on each top-of-rack or core router, and an agreed route filter that accepts only the service pool prefix. Agree the hold time and keepalive expectations with the network team, since they decide how quickly a failed node's routes disappear. Record which router is the peer for each node so a failover can be traced.
Firewall rules for service ports
Open the TCP or UDP ports that each LoadBalancer Service exposes, from the client networks that need them, to the service addresses rather than to node addresses alone. Permit the MetalLB speaker's own traffic between nodes for leader election and, in BGP mode, the BGP session on TCP port 179. Document rules per service so they can be reviewed and removed when a service is retired.
ARP and neighbor behavior on switches
In layer 2 mode, one node answers ARP or neighbor discovery for each service address, and switches learn that node's MAC address. Ask the network team whether switches run ARP inspection, port security, storm control or MAC limits that could block gratuitous ARP during failover. Confirm the ARP cache timeout on hosts and routers, because stale entries delay traffic moving to a new node after a failure.
Change window and routing rollback plan
Any change that adds a BGP peer, alters route filters or moves service prefixes affects production traffic from the routers, not only from the cluster. Agree a change window with the network team, a written list of the router configuration lines being added, and a rollback step that removes the session or filter without a router reload. Test the rollback in a lab or on a non-production peer before the change window opens.
Questions teams ask before running MetalLB
What drives the effort of a MetalLB deployment?
The main drivers are the number of networks that will carry Service IPs, the choice between layer 2 and BGP announcement, and how change control works with the team that owns the routers and firewalls. A single flat subnet with one cluster is a small job. Several VLANs, multiple clusters, BGP peering with top-of-rack or core routers, and a change process that requires written approval for every route or address change each add planning, testing and coordination steps. Ask for the effort to be broken down by network, by announcement mode and by change-control step so you can see where the time goes.
Should we hire a partner to run MetalLB or do it ourselves?
A team with strong Kubernetes networking skills and direct access to the network engineers can usually do it alone, because the software itself is small and well documented. A partner tends to add value where the risk sits outside the cluster: agreeing address plans with the network team, configuring BGP peers correctly, and writing failover tests that prove traffic moves when a node fails. Decide based on who owns the routers, how much BGP experience your team has, and whether the work must be evidenced for an audit. Either way, the written scope should name who does each step.
What do we need to provide before the work starts?
Expect to provide a block of IP addresses reserved for Service use that does not overlap DHCP, node, pod or existing static assignments, plus the cluster and node inventory. For layer 2 mode you need confirmation that the nodes share the target broadcast domain. For BGP mode you need router access or a network engineer who can configure peers, the autonomous system numbers in use, and an agreed route filter policy. You also need test windows on the cluster and the network, and a named contact who can approve changes during those windows.
How long does a MetalLB project take, and why does it vary?
No duration has been established for this work, so ask for a written scope with a timeline before you commit. Duration depends mainly on how quickly IP allocations and router changes are approved, how many networks and clusters are involved, whether the team has to build a lab to test failover, and how many test windows the change process allows. Projects in a single subnet with a fast approval path typically move faster than multi-site BGP work that needs several change requests. Ask the provider to list the dependencies on your side as separate milestones.
How does MetalLB fit into Kubernetes upgrades?
MetalLB runs as workloads in the cluster, so it must be considered in each upgrade plan. Check the MetalLB release against the Kubernetes minor version you are moving to before you upgrade the control plane, and keep the kubelet skew within the limits in the Kubernetes version skew policy. Verify that LoadBalancer Services keep their addresses and that BGP sessions or layer 2 announcements re-establish after each node is drained and returned. Add a post-upgrade test that connects to every announced Service IP from outside the cluster.
What does ongoing operation of MetalLB involve?
Recurring work includes watching address pool usage so new Services do not fail for lack of addresses, reviewing BGP session state and route advertisements after network changes, and tracking MetalLB and Kubernetes security releases. Layer 2 mode needs attention to which node currently answers for each address, because failover depends on ARP or NDP timing and on the switch. Keep alerts on announcements and session health, review pool and IP allocation records with the network team each quarter, and rehearse a node failure at least after each upgrade. Confirm the support model in writing, whether internal or through a retainer.
What a fixed-scope MetalLB engagement covers
A fixed-scope MetalLB engagement starts with an address plan review. DeployOpen can take the IP ranges you intend to hand to LoadBalancer Services, check that they do not overlap with node, pod, service or existing network allocations, and confirm which ranges are reserved for the network team. From there the work covers the announcement design: whether layer 2 or BGP mode fits your network, how each IPAddressPool maps to services and namespaces, and which BGPPeer or L2Advertisement resources are needed. The written scope should name which of these items are in and which network devices, if any, are out.
Installation covers MetalLB deployed into your cluster from images your registry holds, so the build does not depend on pulling from the public internet at install time. DeployOpen can validate the configuration with your network engineers, run failover tests such as stopping the node that holds a service IP or breaking a BGP session, and record the observed behavior. Documentation then covers the address plan, pool definitions, announcement settings, the failover results and the operator runbook. Confirm with your provider which MetalLB release and Kubernetes version the work will target before the scope is signed.
Scope, deliverables and timelines are agreed in writing before any work starts. DeployOpen does not publish a price list. A quote follows from the written scope, so the useful inputs to supply are the number of clusters, the expected number of LoadBalancer Services, whether BGP peering is required and who on your side approves router changes. Ask the proposal to state which tests are included, how many retest rounds are covered and what handover material you receive.

