← All posts

A pinned address is only pinned for the allocator that reads it

Overhead view of a dark circuit-traced floor with two glowing cyan seat platforms: a magenta light-figure sits on one while three others race past the empty one, blurred with speed.

This is my homelab: single-node Talos clusters on one LAN, one operator, and nothing here describes an employer's systems. In July 2026 every cluster's LoadBalancer addresses moved from MetalLB to Cilium's LB-IPAM. The runbook, the commits and the order the clusters went in are on record. The addresses in the excerpts are lab examples, not the real ones.

The comfortable assumption going into that swap was that a pinned address stays pinned. The important Services already named their addresses. On one cluster the edge proxy's address was written into the split-horizon DNS records, chosen so those records would need no change.

A pin is an annotation, though, and an annotation is a note addressed to one reader. This lab's MetalLB pins were written as metallb.universe.tf/loadBalancerIPs. Cilium reads lbipam.cilium.io/ips. Each ignores the other's. The incoming allocator keeps a Service's current address when it can import it. When it cannot (the status is empty, someone else took the address first, or it sits outside the new pool), the annotation written for the old allocator does nothing, and the Service is unpinned as far as the new allocator can tell, however much care went into it.

Think of it as musical chairs with reserved cards on the seats. The cards work while the same host runs the game. Change the host and the new one lets a seated player stay put, but it cannot read the cards. Anyone standing when the music stops is unreserved, card or no card, and whoever moves first sits wherever it likes.

The claim lands before the old announcer leaves: pins in the new key, then the pool, a read-back, and only then the removal

Read every card in the new host's language

The audit is one pass, and it has to ask about both keys, because the dangerous row is the one that looks pinned.

# Read-only. One row per LoadBalancer Service: namespace, name, the MetalLB pin under
# either key, the Cilium pin (annotation, or the older spec.loadBalancerIP field), and
# the address the Service holds right now.
kubectl --context admin@cave get svc -A -o json | jq -r '
  .items[] | select(.spec.type == "LoadBalancer")
  | [.metadata.namespace, .metadata.name,
     (.metadata.annotations["metallb.io/loadBalancerIPs"]
       // .metadata.annotations["metallb.universe.tf/loadBalancerIPs"] // "-"),
     (.metadata.annotations["lbipam.cilium.io/ips"] // .spec.loadBalancerIP // "UNPINNED"),
     (.status.loadBalancer.ingress[0].ip // "none")] | @tsv'

A row with an address in the third column and UNPINNED in the fourth is the trap: reserved for the outgoing allocator, and kept by the incoming one only if it can import the address. Run against the hub on 1 December 2026, every row carries a Cilium pin that matches the address it holds. The MetalLB column reads - on all rows but one. That Service is rendered into the node's bootstrap manifests, and it still carries its MetalLB annotation because the cleanup commit only reached the manifests ArgoCD syncs.

Bulk edits miss rows, which is why the read matters more than the edit. On the hub I added the new pins with a pattern match across the manifests. One Service slipped through: its MetalLB line ended in a trailing comment, the pattern did not match it, and its pin landed in a fixup commit two minutes later, before the new pool existed.

The last column tells you what each row is worth. If a DNS record, a firewall rule or a tunnel names that address, the Service that holds it carries every one of those names with it.

Seat the claims while the old host still runs the game

The media cluster had already swapped on 2 July. The canary proved the order on 7 July, and the order is dull on purpose. The new pin goes on beside the old one, which changes nothing on the wire because MetalLB still owns every address. The datapath flips to Cilium's kube-proxy replacement as its own step. Then the MetalLB controller is scaled to zero, so the addresses it recorded stop changing while its speaker keeps answering ARP. Only then does the Cilium pool land, and it honours the pins rather than racing for them.

# Excerpt, as committed, with a lab example address: the model server's Service on one
# cluster. The pin names a single address from that cluster's pool; without it, a
# Service that loses its address takes whatever is free.
apiVersion: v1
kind: Service
metadata:
  name: ollama
  namespace: llm-serving
  annotations:
    lbipam.cilium.io/ips: "10.0.0.31"   # lab example address
spec:
  type: LoadBalancer

The gate before removing anything, as the runbook wrote it: every Service holds the exact address it was pinned to, and an arping from another LAN host gets the node's MAC back for each one. That proves the address answers, not who answers. On one node both announcers reply with the same MAC while MetalLB's speaker is up, which is also why the overlap is safe there; across several nodes they could answer from different machines. Cilium's own claim can be read directly: kubectl -n kube-system get lease | grep cilium-l2announce lists one lease per announced Service, and on the hub on 1 December every holder is the node. I did not gate on it in July.

MetalLB came out after that, in a separate commit. The runbook asked for a 48-hour soak before the hub, and the hub went the same evening. Its datapath flipped eighteen minutes before its pins went on, but the pins still landed before the freeze and the pool, and it passed the same gates that evening.

On 14 July the last three clusters came back on after a move, and the first of them got its pins, its new pool and MetalLB's removal in a single commit. The pool and the Service pin sat in two ArgoCD Applications that sync in parallel, so one commit set no order between them. The pool came up before the model server's pin reached the live object, and the model server sat down in the edge proxy's freed seat. A hard refresh applied the pin and put both back where they belonged, with no outage, and the landing post records that night in brief. The other two clusters each got their pins and pool first, a hard refresh to land them, and then a second commit for the removal.

Put the card on the chair the host checks

A Gateway owns its Service. Cilium's gateway controller generates a LoadBalancer Service for each Gateway, and on the media cluster that Service's owner reference is the Gateway itself. The pin belongs on the Gateway, in spec.infrastructure.annotations, and the controller copies it onto the Service it generates. My notes say to pin through the Gateway and not the generated Service, because the controller owns that Service. I did not test the other way round.

# Excerpt, as committed, with a lab example address. The controller copies this
# annotation onto the Service it generates for the Gateway, cilium-gateway-media-gw.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: media-gw
  namespace: gateway
spec:
  gatewayClassName: cilium
  infrastructure:
    annotations:
      lbipam.cilium.io/ips: "10.0.0.40"   # lab example address

Read on 1 December 2026, the generated Service carries that annotation and holds the address it names.

The other chair that needs care is the shared one. DNS answers on UDP and TCP, and in this lab each protocol has its own Service on one address, a split MetalLB forced and the swap kept. Cilium lets two Services hold one address when both carry the same lbipam.cilium.io/sharing-key beside their pins. The canary's gate for that was blunt: both DNS Services hold the one address, and a query answers over UDP and over TCP. It passed on 7 July, and the hub's pair went across the same way.

The principle

A claim on a shared resource is only as good as the reader it is addressed to. When you replace the reader, every claim it honoured holds only as far as the new reader can carry it over. So rewrite each one in the new reader's terms, let the old reader keep holding everything while you read the claims back (on one machine, where the two cannot answer over each other), and make the removal a step with its own check.

The card you wrote for the last host is an empty seat to the next one.

MetalLB v0.15.3 to Cilium 1.19.4 LB-IPAM on six single-node Talos clusters, July 2026. The media cluster went on 2 July; the five after it kept every address, one of them after a hard refresh. Pins read back from the live Services on 1 December 2026.

Read next