talos  /  synthesis power-on → Ready
Chapter 10

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.

  1. 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
  2. initramfs PID 1. init mounts /proc, /sys, /dev, extends PCR 11 with enter-initrd, loop-mounts the read-only squashfs root (overlaying any system-extension layers), then switch_roots into it and execs the real PID 1. ch.01, ch.04
  3. 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
  4. The sequencer runs Initialize. It enforces KSPP kernel hardening, starts the early services (udevd, machined API, apid, containerd), reloads META, and runs LoadConfig. ch.01
  5. Config is acquired. AcquireController walks its sources — STATE disk, embedded, platform user-data, kernel cmdline — and if none exist, enters maintenance mode and waits for talosctl apply-config. The result becomes a MachineConfig resource at ActiveID. This is the moment the desired state enters the system. ch.03
  6. The graph wakes up. Every controller watching MachineConfig fires. Block controllers discover disks and drive the EPHEMERAL/STATE volumes through Located → Provisioned → Prepared → Ready, unlocking LUKS2-encrypted volumes against the TPM during the enter-machined PCR window. The Install sequence writes Talos to disk if this is bare metal. ch.04, ch.01
  7. 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. NodeAddressController decides the node's canonical IPs. ch.05
  8. 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
  9. etcd & the control plane. On talosctl bootstrap (one node, one time) etcd starts initial-cluster-state=new; peers join later as learners. Once etcd is healthy, the k8s controllers render kube-apiserver/controller-manager/scheduler into StaticPod resources, serve them as a PodList over localhost HTTP, and the kubelet — itself a Talos service — runs them. ch.06
  10. The Boot sequence finishes. StartAllServices brings up the rest; bootstrap manifests (CNI, kube-proxy, CoreDNS) are applied once under an etcd lock. The node registers, NodeApplyController stamps its labels and taints, and the kubelet reports Ready. ch.06
  11. 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 upgrade and the node A/B-swaps to a new image, auto-reverting if it fails to come back healthy. ch.07, ch.09
The punchline.

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.

ChapterOwnsLives inThe one idea
01 BootMachine lifecycleruntime/v1alpha1Ordered phases of parallel tasks, one at a time via a priority lock.
02 RuntimeThe controller hostruntime/v1alpha2Imperative sequencer + declarative COSI graph share one resource state.
03 ConfigDesired statepkg/machinery/configMulti-document config composed into one Provider, stored as a resource.
04 StorageDisks & volumescontrollers/blockEverything is a volume walking a phase machine; the root is immutable.
05 NetworkingLinks, addrs, DNScontrollers/networkConfig → Merge → Spec → Kernel; Status flows back. ×50 controllers.
06 KubernetesCluster & etcdcontrollers/k8s, /etcdControl plane = static pods rendered from config; no kubeadm.
07 APIThe surfaceapp/apid, app/trustdOne mTLS gRPC door; role lives in the client cert's Organization.
08 SecurityTrust & isolationcontrollers/secrets, securebootPKI from config, measured boot to the TPM, WireGuard overlays.
09 UpgradesLifecycle of the imagecmd/installer, pkg/imagerAtomic 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.

1 · Desired vs observed *Spec vs *Status never reconciled into one addresses · volumes · pods 2 · Layered merge many sources → priority → one highest layer wins network config · sysctls 3 · Transform chain config → Config → Final → run small typed steps apiserver args · etcd spec 4 · Idempotent apply locate-or-create · skip-if-equal retry + backoff forever partitions · rtnetlink · SSA 5 · State that survives META key = transaction marker presence == "uncommitted" upgrade revert · STATE enc
The same five moves, instantiated by every controller family.
  1. Desired and observed are separate resources. A *Spec says what should be true; a *Status reports 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
  2. 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
  3. 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
  4. 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
  5. 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.

Keep going.

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.