Talos Linux and the pleasure of doing less

Talos Linux is built to run Kubernetes. There is no SSH service or bundled host login shell. Host configuration goes through an API, and system extensions supply drivers and other components as part of the OS image.123

One fixes a conventional Linux host over SSH and gets the service running. Updating the configuration can wait until things are less urgent. The replacement host then reproduces the configuration we kept, including the fault we had already fixed.

A replacement Talos worker can reuse its pool's image and configuration inputs during provisioning. Changes can be reviewed and reused across nodes instead of repeated through login sessions. The read-only base limits configuration drift by preventing manual edits to base-system files.14

From provisioning to workloads

The siderolabs/talos provider lets OpenTofu generate cluster secrets and machine configuration, apply configuration through the Talos API, bootstrap the control plane and check cluster health. Provisioning and OS configuration can share the same dependency graph.4

An infrastructure provider creates the networks, disks and machines. Their addresses and the Kubernetes API endpoint feed the Talos configuration. Configuration application precedes initial bootstrap, followed by health checks and the handoff to Kubernetes delivery tools. Resource references express dependencies where values flow between these steps. Explicit dependencies cover prerequisites such as firewall rules that must exist before the runner can reach a node.5

Across sites, the infrastructure resources differ while the Talos configuration model stays the same. Kubernetes controllers reconcile the workloads deployed onto those nodes. Storage, networking and recovery still need to be designed, but host setup can be included in provisioning instead of maintained as a separate collection of shell procedures. OpenTofu is optional. The same Talos API can be used directly through talosctl.6

Configuration worth keeping

Generated machine configuration mixes cluster-specific settings with defaults, credentials and component versions. The Talos generation-version contract, set with --talos-version, is the version originally used to generate the configuration. It sets the generator's target compatibility version, separate from the OS image version installed on a node. Leaving it unset or updating it can introduce different fields or defaults. An OS image upgrade does not require changing that contract at the same time.7

Retain the cluster name and endpoint, the existing secrets bundle, the generation contract, the intended Kubernetes version and the patches. Keep the contract fixed until deliberately changing it, while --kubernetes-version follows the cluster's current Kubernetes version. Hardware-specific image choices, node labels and network settings also belong among these inputs. Pin the client version and review schema and default changes before regenerating configuration with a newer client.7

The examples here target Talos 1.14.0, which uses multi-document configuration for newly generated configs. For a worker, worker-labels.yaml can contain a typed document adding a node label:8

YAML
apiVersion: v1alpha1
kind: KubeNodeConfig
labels:
  nodepool.example.net/purpose: general

The patch adds a worker label without duplicating the rest of the generated configuration. Use KubeNodeConfig here. Adding the older machine.nodeLabels field alongside an already generated typed document mixes configuration formats. Talos matches multi-document patches by kind, apiVersion and name where applicable, appending a document when it is absent. Patch order and list merge rules affect the result.91011

With Talos 1.14.0's talosctl and an existing, protected secrets.yaml, this configuration can be generated, patched and validated locally:

Shell
umask 077
talosctl gen config article-demo https://k8s.example.net:6443 \
  --talos-version v1.14.0 --kubernetes-version 1.37.0 \
  --with-secrets secrets.yaml --output generated
talosctl machineconfig patch generated/worker.yaml \
  --patch @worker-labels.yaml --output worker-reviewed.yaml
talosctl validate --config worker-reviewed.yaml --mode metal --strict

These commands only write and validate local files. Before applying the generated configuration, replace the example endpoint and review the installer image, installation disk and network configuration for the machine. Schema validation cannot establish that a disk is safe to overwrite or that the proposed network will be reachable.

Create the secrets bundle when preparing the cluster, store it securely and reuse it when regenerating configuration. A fresh bundle would generate a different cluster identity. Generated machine configurations and talosconfig, the client authentication file, also contain sensitive material. Keep them out of ordinary Git history and encrypt their storage and backups, with access restricted to those who need them.123

Customization goes into the image

Firmware, drivers and other host components are supplied through system extensions, activated during installation or upgrade. They become part of the read-only root filesystem.2

Image Factory uses YAML schematics to select customizations. Each schematic's content determines its identifier. This example selects the official AMD microcode extension:

YAML
customization:
  systemExtensions:
    officialExtensions:
      - siderolabs/amd-ucode

The schematic selects the extension without containing cluster secrets or replacing machine configuration. To pin the complete artifact, also retain the Talos release, architecture, model such as ISO or disk image, and model-specific options. The selected artifact determines which customizations apply: Factory's installer and initramfs images take system extensions from schematics, but ignore schematic kernel arguments and META values.13

Retain the extension selection with the other machine inputs and reuse it for replacements and OS upgrades. Extensions vary by Talos release and support tier. A driver needed to reach the network or disk during boot must be present in the boot assets, not only in an installer used later.213

Talos 1.14 no longer publishes the old ghcr.io/siderolabs/installer image with releases. Factory supplies installer images and can be used as a hosted service or self-hosted, without adopting a separate cluster-management service.813

A fleet with a few maintained host profiles can reuse those images across machines. If operations depend on installing arbitrary host software during an incident, that workflow needs to change. Required software needs a supported integration or system extension before rollout.

API access and initial trust

Talos components communicate through gRPC interfaces over local sockets. Remote administration uses the Talos API with mutual TLS: the client verifies the node, and the node verifies the client using certificates. This API manages the operating system independently of the Kubernetes API and pod networking.114

If the Kubernetes control plane is unhealthy but the node and its management network remain reachable, you can still inspect the OS through the Talos API. Automation uses the same API without relying on shell utilities installed on the host.15 For tools absent from the base image, talosctl debug can launch a temporary privileged container through the API, using an image you supply.16

Omitting SSH and a bundled host login shell reduces the software exposed for remote administration, but API credentials can authorise reconfiguration, rebooting, wiping or replacing a node. Restrict access to both the credentials and the management network. Privileged workloads, network access and disk encryption still need their own controls.3

The remote API normally uses TCP port 50000. A load balancer must forward its gRPC and mutual-TLS connection at the TCP layer rather than terminate it as an ordinary HTTP reverse proxy.12

An unconfigured standalone node does not yet have the cluster certificates. In maintenance mode, it presents a temporary, self-signed TLS certificate. The --insecure option bypasses certificate verification. Traffic remains encrypted, but mutual authentication is absent. Without verifying the target, you could send the configuration to the wrong machine.14

Talos prints the maintenance certificate fingerprint to the node's console. Obtaining that fingerprint through a trusted physical, VM, serial or out-of-band console allows it to be supplied with --cert-fingerprint during initial configuration. That confirms the target certificate. It does not give the maintenance service client authentication, so a controlled provisioning network remains part of the design. Once the machine configuration has established mutual trust, subsequent management uses authenticated access without --insecure. Test API access and the trusted console before relying on them during an incident.14

Initial etcd bootstrap happens after machine configuration has established the nodes' identities and settings. Once the control-plane nodes have booted, bootstrap etcd once against a single control-plane member. This forms the initial etcd cluster. It is not a routine repair command.12

Looking at a broken node

With an authenticated talosctl client, inspect node resources, services, logs and containers through the API:

Shell
talosctl --nodes "$NODE" get addresses
talosctl --nodes "$NODE" service
talosctl --nodes "$NODE" logs kubelet
talosctl --nodes "$NODE" dmesg
talosctl --nodes "$NODE" containers --namespace=cri

Here NODE is the node address and the client already has its authenticated configuration. Talos 1.14 uses --namespace=cri when inspecting Kubernetes-side containers.1615

If the management API cannot be reached, start with host addressing, routes, firewall rules and console access. If the OS is reachable but the control plane is not, inspect etcd, kubelet and the control-plane containers. CRI container logs are available through talosctl logs --namespace=cri with the container identifier. Once the Kubernetes API is functioning, workload debugging can return to kubectl.15

talosctl health runs basic cluster checks, which do not establish application or storage correctness. talosctl support gathers logs and node information into a support bundle.15

Applying configuration

A node can accept configuration before every affected service uses it. Talos 1.14 also changes the available apply modes.17

Plain text
Talos 1.14 apply modes

auto / no-reboot   apply to the running node
staged            save for the next reboot, do not reboot
try               apply now, revert after the timeout

The default auto mode applies configuration live, as does no-reboot. staged defers application until the next reboot without initiating one. try attempts immediate application and, by default, reverts after one minute if no further configuration update is applied. Its timeout is configurable. The old --mode=reboot option was removed in 1.14, so rebooting is an explicit action.17

For example, Talos does not implicitly restart etcd when its configuration changes. That would disrupt a control-plane member. Long-running services may consume settings only on restart, loaded kernel modules have their own timing, and installation settings are consumed during installation or upgrade. A reboot is not a universal way to apply installer configuration.17

Configuration-editing tools read the active configuration, not the pending staged candidate. Retain the staged file and make subsequent edits there, or they may omit changes still waiting for a reboot.17

Applying configuration with OpenTofu

For an already configured worker, this resource stages configuration for the next reboot. The variables are inputs supplied by the calling module: the node address, a reachable Talos API endpoint, authenticated client credentials and the generated machine configuration. The example uses the siderolabs/talos 0.11.0 resource schema.18

HCL
resource "talos_machine_configuration_apply" "worker" {
  node                        = var.worker_address
  endpoint                    = var.talos_endpoint
  client_configuration        = var.talos_client_configuration
  machine_configuration_input = var.worker_configuration
  apply_mode                  = "staged"

  on_destroy = {
    reset    = false
    graceful = true
    reboot   = false
  }
}

The maintenance workflow schedules the reboot separately. Removing this apply resource leaves the node unreset, while VM deletion and storage protection remain responsibilities of the infrastructure resources.18

Pin the provider version as well as the configuration-generation contract. The provider's generator uses its bundled Talos SDK, so a provider upgrade can change the schema and defaults it understands.19

What OpenTofu state records

OpenTofu records managed resource identities and attributes in its state file. Its configuration declares the desired state, but detecting drift on a running node depends on the provider reading it back. In provider 0.11.0, talos_machine_configuration_apply has an empty refresh implementation. It applies planned configuration changes without fetching the node's current configuration. Detecting changes made outside OpenTofu requires a separate read-back workflow. A successful staged apply still leaves the settings waiting for a reboot.20

OpenTofu state can contain Talos credentials and generated configuration. Marking an attribute sensitive controls display, not encryption. Restrict access to the backend. OpenTofu supports encryption for state and saved plans, and recovery requires the encryption keys as well as the state. Keep application reconciliation with its Kubernetes controllers and avoid assigning the same settings to competing managers.21

Two upgrade lifecycles

An OS upgrade names an installer image through the Talos API. Talos cordons the node, drains its workloads, stops services, unmounts filesystems and writes the new image. It then boots the replacement and, after verifying its return, makes the boot choice permanent and uncordons the node.11

The A-B image scheme retains the previous kernel and OS image. A failed boot can trigger automatic rollback, and an operator can request rollback through the API. Rolling back the OS does not restore etcd to yesterday, downgrade Kubernetes or undo application writes. A node that boots successfully but exposes a workload compatibility problem still requires an operator's judgment.11

Draining a node does not create spare capacity or extra copies of its data. Sequence upgrades around the storage system's quorum and recovery requirements, and do not upgrade all nodes together. Tested Talos OS migrations cover adjacent minor releases. For a larger jump, follow the intermediate minors using their latest patch releases.11

A Talos OS upgrade does not upgrade Kubernetes by default. The versions must remain compatible, and bootstrap manifests can change with the Talos version. In a standalone cluster, talosctl upgrade-k8s is addressed to one control-plane node but orchestrates the cluster upgrade. It handles component and kubelet changes in sequence and can be rerun to continue after a failure. Kubelet upgrades can restart workloads.1122

upgrade-k8s also updates component image versions in the live machine configurations. Reapplying an old full configuration file can unintentionally downgrade those components. After the upgrade, update the retained Kubernetes version used for configuration generation.22

A read-only base with somewhere to put the state

Talos ships as a versioned OS image with a read-only SquashFS root filesystem. The OS release identifies the base software installed on a node.1

Talos generates writable runtime files separately. For example, /system/etc/hosts is bind-mounted over /etc/hosts, leaving the base /etc read-only apart from configured mounts. Files under /system are recreated on boot. Persistent paths can use overlays backed by writable storage.1

Container images, kubelet data and etcd state need writable storage. Machine configuration and node identity must also survive a restart. These are stored separately from the immutable OS base:

Plain text
OS base             read-only image
Runtime files       recreated as needed at boot
STATE               machine configuration and node identity
EPHEMERAL           persistent /var backing by default
Application data    governed by the chosen storage layout

Despite the name, EPHEMERAL survives normal reboots and OS upgrades. In the default layout, the ETCD, CRI, KUBELET and LOG volumes are directories beneath it. Talos 1.14 also supports dedicated partitions for those system volumes. Reset and disk-wipe operations can destroy data that an upgrade preserves, so recovery procedures need to match the volume layout.123

Node replacement and data recovery

A worker with no irreplaceable local data can be replaced from its retained image and machine-configuration inputs. A server holding the only copy of a database cannot be discarded on the strength of a reproducible OS image. Recovering the control plane may require an etcd snapshot, while application data needs its own backups.

A consistent etcd snapshot can be streamed from a healthy control-plane member to a file on the client machine. With authenticated access and CONTROL_PLANE set to that member's address:

Shell
umask 077
talosctl --nodes "$CONTROL_PLANE" etcd snapshot db.snapshot

Schedule etcd snapshots and store them securely. Preserve the configuration and secrets needed to recreate matching control-plane nodes so existing workers can join the recovered cluster. If etcd quorum can be restored, rebuilding the control plane from a snapshot may be unnecessary. Full disaster recovery requires matching configuration and secrets, prepared etcd services, and one member bootstrapped from the snapshot. Follow the recovery procedure for the volume layout.24

An etcd snapshot captures Kubernetes state. It is not a backup of the bytes in separately managed persistent volumes or an application-consistent database backup. Recovering a PersistentVolume object does not recreate the contents of a missing disk. Storage snapshots, database backup procedures and any external services remain part of the application's recovery design.2425

Networking and storage

A node can have a reachable Talos API while Kubernetes is waiting for its CNI to start. Talos ships Flannel as the default CNI. Kubernetes only marks the node Ready once its CNI is up.15

Addressing, routing and management firewalls belong to the host and infrastructure design. Pod and service ranges, CNI behavior and application exposure belong to additional layers. In cloud deployments, external node IP management involves the Kubernetes Cloud Controller Manager. Booting the correct disk image does not provision every surrounding integration.15

The chosen CSI implementation and storage system determine storage capabilities and operating procedures. Sidero Labs recommends dedicated storage disks separate from the Talos installation disk, so OS installation and application storage can be maintained separately.25

CNI and CSI components have independent releases and support lifecycles. Check their compatibility and configuration with the rest of the cluster. Successfully booting Talos does not test either integration.26

Stateless services make it easier to test node upgrades and replacement without depending on local application data. For workloads that need local storage, accelerators or specialized networking, include the required host components in the image and test them before retiring the existing platform.

Start with a cluster, not a fleet conversion

Talos can be managed directly with talosctl or through Omni, an optional management layer. If Omni manages the cluster, perform Kubernetes upgrades through it rather than independently running talosctl upgrade-k8s.622

Start with a separate cluster on existing virtual machines or spare hardware. Test the required extensions and diagnosis without SSH while the existing service platform stays in place. Networking, storage and application delivery can stay unchanged unless the trial exposes a reason to replace them.

For cloud deployments, select the platform's disk-image format from Image Factory and check the Talos support matrix for the platform's testing tier. Check support for the instance type separately. A listed cloud provider does not mean its managed Kubernetes service supports Talos as a replacement node OS.1327

GPU workers also need compatible drivers, runtimes and networking. Hybrid LLM inference with Talos and llm-d covers those choices, including cloud images and how the components fit into the host configuration.

In the trial cluster, replace a worker using the image, configuration inputs and secrets you intend to retain, then bring it back into service. Rehearse control-plane and application-data recovery separately and regularly.3 After restoring the nodes and Kubernetes objects, verify that the application can open its data and perform its work.

Sources