Kubernetes at Scale
Running stateful telecom network functions on Kubernetes, and building the install and upgrade tooling that makes a multi-site estate repeatable instead of heroic.
- Network-function tool
- 219 commits
- Infrastructure tool
- 123 commits
- Code written
- +93,000 lines
- Scope
- 30+ network functions
The problem
Stateful network functions are not web services. They hold sessions, they peer with external networks, they expect particular kernel and network configuration, and they cannot be drained casually. Vendor 5G core installs compound this: the documented procedure is a sequence of manual steps, it differs per site, and nothing records what was actually done — so a year later nobody can say why two sites differ.
What we built
Delivery for stateful workloads
Overlay-based delivery with Helm and Kustomize for more than thirty stateful network functions, secrets held in a vault rather than in the manifests, and promotion between development and production environments as a controlled step rather than a copied directory.
An install and lifecycle tool
A command-line tool that installs and upgrades vendor network functions from a declared description of each site. Its most useful feature is the least glamorous one: a survey mode that performs a full dry run and reports every blocker it finds, rather than stopping at the first. An operator gets one list to resolve instead of discovering problems one at a time across an evening.
- Day-1 gates that verify the preconditions a vendor install assumes but does not check.
- Site-parameterised builds, so a second site is a declaration rather than a fork.
- Controlled chart cutovers, one function at a time, with the previous revision recoverable.
A second tool for the infrastructure beneath
The cloud infrastructure under those functions needs the same discipline. A companion tool manages the estate with ownership guards (so a stack nobody owns cannot be modified by accident), change-set based imports for resources created by hand, and drift detection with an evidence loop — an inconclusive detection discards its own result rather than reporting a false clean.
What the gates actually check
A vendor install procedure assumes a great deal about the state it is dropped into. The gates make those assumptions explicit and testable — and most of the engineering effort went into the cases where the obvious check is the wrong one:
- Identity is read from the network function’s own identifier, not from the release name it happens to be installed under — those diverge the moment anything is reinstalled.
- An existing function at an older software version is the starting point of a re-instantiation, not a reason to stop. Treating it as a blocker is what turns a routine upgrade into a manual one.
- Dependencies between functions that the documentation leaves implicit are declared, so install order is derived rather than remembered.
- Post-install verification polls for a healthy result instead of assuming the command’s exit code meant anything.
Drift detection that admits when it does not know
Comparing declared infrastructure against live infrastructure is easy to do badly. A transient API error looks identical to “no drift” unless you design for it. Here the detection runs an evidence loop: transient failures are retried, and any detection that finishes inconclusive purges its own result rather than recording a clean state it cannot support. Accepted differences are tracked explicitly and pruned when they retire, so the accepted-drift list stays meaningful instead of becoming a dumping ground.
How it holds up
Both tools carry their own libraries and test suites, and both ship with day-2 procedures written for the person on call rather than the person who built them: daily checks, drift sweeps, planned and emergency changes, bringing up a new site, and decommissioning one. The test suite is the larger part of the second tool, which is the right ratio for software whose failure mode is a change applied to live infrastructure.
Details here are generalised: specifics of any operator, partner or site are deliberately omitted.
Related reading: browse the containers notes.
