The Whole Machine
Ten chapters of parts; one machine. This closing chapter reassembles them — tracing a single Talos node from the firmware handing control to a kernel, all the way to a Ready Kubernetes member — then names the handful of design patterns that recur at every layer, and what is worth stealing for your own systems.
#Power-on to Ready: the full trace
Here is the whole life of a control-plane node, with each step pointing back at the chapter that explains it. Nothing here is a script being run; almost everything after step 5 is a controller reacting to a resource.
- Firmware → kernel. UEFI (optionally with SecureBoot verifying the UKI signature) loads the Talos UKI — kernel + initramfs + cmdline in one signed PE binary — and jumps into the kernel. → ch.09, ch.08
- initramfs PID 1.
initmounts/proc,/sys,/dev, extends PCR 11 withenter-initrd, loop-mounts the read-only squashfs root (overlaying any system-extension layers), thenswitch_roots into it and execs the real PID 1. → ch.01, ch.04 - machined takes over as PID 1. It starts the process reaper and launches the COSI controller runtime in a goroutine — the ~200-controller reconciliation graph — over a shared resource state. → ch.02
- The sequencer runs
Initialize. It enforces KSPP kernel hardening, starts the early services (udevd,machinedAPI,apid,containerd), reloads META, and runsLoadConfig. → ch.01 - Config is acquired.
AcquireControllerwalks its sources — STATE disk, embedded, platform user-data, kernel cmdline — and if none exist, enters maintenance mode and waits fortalosctl apply-config. The result becomes aMachineConfigresource atActiveID. This is the moment the desired state enters the system. → ch.03 - The graph wakes up. Every controller watching
MachineConfigfires. Block controllers discover disks and drive the EPHEMERAL/STATE volumes throughLocated → Provisioned → Prepared → Ready, unlocking LUKS2-encrypted volumes against the TPM during theenter-machinedPCR window. TheInstallsequence writes Talos to disk if this is bare metal. → ch.04, ch.01 - The network converges. The Config → Merge → Spec → Kernel pipeline brings up links and addresses: a default DHCP4 operator leases an IP, machine-config addresses override it by layer priority, and Spec controllers apply the merged desired state to the kernel via rtnetlink.
NodeAddressControllerdecides the node's canonical IPs. → ch.05 - Secrets materialize. The secrets controllers derive the OS / Kubernetes / etcd root CAs from the config and mint every leaf certificate as a COSI resource — apid's serving cert, etcd's peer/member certs, the kubelet's bootstrap identity — refreshing them automatically at half their lifetime. → ch.08
- etcd & the control plane. On
talosctl bootstrap(one node, one time) etcd startsinitial-cluster-state=new; peers join later as learners. Once etcd is healthy, the k8s controllers renderkube-apiserver/controller-manager/schedulerintoStaticPodresources, serve them as aPodListover localhost HTTP, and the kubelet — itself a Talos service — runs them. → ch.06 - The Boot sequence finishes.
StartAllServicesbrings up the rest; bootstrap manifests (CNI, kube-proxy, CoreDNS) are applied once under an etcd lock. The node registers,NodeApplyControllerstamps its labels and taints, and the kubelet reportsReady. → ch.06 - Steady state = reconciliation. From here nothing is "done" — it is maintained. Edit the config via the API and the same controllers re-converge. Run
talosctl upgradeand the node A/B-swaps to a new image, auto-reverting if it fails to come back healthy. → ch.07, ch.09
There is no rc.local, no Ansible playbook, no kubeadm init. Between "apply a config" and "Ready node" sits a reconciliation graph that turns one declarative document into a running Kubernetes machine — and keeps it that way. The boot is just the first reconcile.
#The subsystem map
Every chapter, as one row — what it owns, where it lives, and the single idea to remember.
| Chapter | Owns | Lives in | The one idea |
|---|---|---|---|
| 01 Boot | Machine lifecycle | runtime/v1alpha1 | Ordered phases of parallel tasks, one at a time via a priority lock. |
| 02 Runtime | The controller host | runtime/v1alpha2 | Imperative sequencer + declarative COSI graph share one resource state. |
| 03 Config | Desired state | pkg/machinery/config | Multi-document config composed into one Provider, stored as a resource. |
| 04 Storage | Disks & volumes | controllers/block | Everything is a volume walking a phase machine; the root is immutable. |
| 05 Networking | Links, addrs, DNS | controllers/network | Config → Merge → Spec → Kernel; Status flows back. ×50 controllers. |
| 06 Kubernetes | Cluster & etcd | controllers/k8s, /etcd | Control plane = static pods rendered from config; no kubeadm. |
| 07 API | The surface | app/apid, app/trustd | One mTLS gRPC door; role lives in the client cert's Organization. |
| 08 Security | Trust & isolation | controllers/secrets, secureboot | PKI from config, measured boot to the TPM, WireGuard overlays. |
| 09 Upgrades | Lifecycle of the image | cmd/installer, pkg/imager | Atomic A/B image swap with auto-revert; META bridges the reboot. |
#Five patterns that recur everywhere
Read enough of the source and the same five moves appear in every subsystem. They are the real architecture — the controllers are just instances of them.
- Desired and observed are separate resources. A
*Specsays what should be true; a*Statusreports what is true; convergence is emergent, never forced in one write. This is what lets Talos want an address before its link exists, or a pod before etcd is healthy. → ch.05 - Many config sources, merged by priority. Defaults, kernel cmdline, platform metadata, dynamic operators, and the machine config all feed candidate specs tagged with a layer; a merge step keeps the highest. Adding a source never means editing the consumer. → ch.05, ch.03
- Transform chains of small typed steps. Rather than one big function, Talos threads
config → Config resource → Final resource → running process, each a tiny controller. The "Final" step is the single source of truth for the exact arguments. → ch.06 - Every apply is idempotent and self-healing. Locate-or-create, skip-if-already-equal, take a lock, retry with backoff forever. Re-running a reconcile is always safe — which is why a flapping NIC, a racing disk lock, or a duplicated controller never corrupts anything. → ch.04, ch.05
- A little durable state bridges the gaps reconciliation can't. The META partition carries the handful of facts that must survive a wipe or a reboot — the staged-upgrade image, the disk-encryption config, and the upgrade fallback marker whose mere presence means "this upgrade isn't confirmed good yet." → ch.09
#What to steal
You do not have to run Talos to learn from it. If you are building any system that looks like "take a desired state, make the real world match it, and keep them matched" — a VM control plane, a device fleet manager, a GitOps agent, an appliance — Talos is a worked reference for the hard parts.
Model the world as typed resources
Strict metadata, opaque spec, a *Spec/*Status split. Once your state is resources in a watched store, controllers, an API, and an audit log all fall out for free.
One authenticated surface, no back doors
No SSH means no unaudited mutation. A single mTLS API with the caller's role in their certificate makes "who can do what" a property of the PKI, not a pile of sudoers files.
Immutable images, atomic swaps
Ship the whole OS as a versioned artifact and upgrade by booting a different one. A/B slots plus an auto-revert marker turn "upgrade" from a risky in-place mutation into a transaction.
Make every step retry-safe
Design reconciles so that running them twice is a no-op and running them after a crash heals the gap. Idempotence is what makes "just restart the controller" a valid recovery strategy.
#Talos and COSI
The reconciliation engine underneath all of this — the resource model, the State broker, the controller runtime, the reconcile loop — is not Talos-specific. It is COSI (cosi-project/runtime), extracted by Sidero Labs as a reusable library and used here in its largest, most complete application. If this deep dive left you wanting the engine internals rather than the machine built on them, its companion is one click away.
Read the COSI Runtime — Architecture Walkthrough for the engine: what a resource really is, how the State broker streams every change, the two controller flavours, and the reconcile engine that drives them. Talos is the proof that the model scales to a whole operating system.
That is the whole machine: a kernel, one process, a graph of controllers, and a single document that says what the node should be. Everything else is reconciliation.