Skip to content

Bootstrap a Kubernetes cluster on Talos Linux (no SSH, no shell)

A practical Talos Linux Kubernetes cluster bootstrap: generate machine config with talosctl, apply it to nodes, run talosctl bootstrap, pull the kubeconfig, join workers, and debug an OS you cannot log into.

Talos Linux is a Kubernetes operating system with no shell, no package manager, no systemd units you can edit, and — the part that surprises everyone the first time — no SSH daemon. The entire machine is driven by a gRPC API on port 50000 and one binary, talosctl. Every piece of node state comes from a single YAML machine config, and if you want to change something, you change that YAML and apply it again. This guide takes you from a freshly booted Talos image to a working three-node control plane with workers attached: generating the config, applying it in maintenance mode, running talosctl bootstrap exactly once, pulling the kubeconfig, layering config patches for static IPs and system extensions, upgrading both Talos and Kubernetes, and — most importantly — diagnosing a broken node when there is no shell to log into.

What you’ll accomplish

  • Generate controlplane.yaml, worker.yaml, and talosconfig from a single talosctl gen config run, and understand which of those files you must keep safe.
  • Apply machine config to nodes in maintenance mode, bootstrap etcd on one node, and pull a working kubeconfig.
  • Join workers and confirm cluster membership from both the Talos side and the Kubernetes side.
  • Layer reusable YAML config patches for things a stock config does not cover: static addressing, extra disks, and system extensions.
  • Upgrade Talos and Kubernetes independently, and debug an unreachable node using only the Talos API.

Prerequisites

  • Talos Linux v1.x (the commands below are current as of the v1.11–v1.13 line) and a matching talosctl on your workstation. Keep talosctl at or above the version of the cluster you are managing.
  • At least three machines for the control plane if you want etcd quorum, plus one or more workers. A single control-plane node works fine for a lab and is a supported topology — it just has no quorum to lose.
  • A kubectl binary, and network reachability from your workstation to TCP 50000 (Talos API) and 6443 (Kubernetes API) on the nodes.
  • On a hypervisor (Proxmox, vSphere, KVM, OpenStack) you boot the Talos ISO or import the disk image, and the install disk is usually predictable — /dev/sda or /dev/vda. On bare metal, disk naming is not predictable: an NVMe boot drive shows up as /dev/nvme0n1, and a machine with a RAID controller may present something else entirely. Do not guess. There is a command below that asks the node directly.
  • A stable cluster endpoint. For a single control-plane node that is just its IP. For multiple control-plane nodes you need a load balancer, a VIP, or a DNS name in front of port 6443 — Talos will not invent one for you. If you are choosing a VIP mechanism, kube-vip with ARP is a common answer.

How it works

Talos has no login because there is nothing to log into. The root filesystem is squashfs and read-only, /var is the only writable area that survives a reboot, and there is no /bin/sh in the host namespace. Instead, an apid/machined pair exposes a gRPC API, authenticated with mutual TLS. Your client certificate lives in talosconfig. Lose that file and you have locked yourself out of the machine as thoroughly as losing an SSH key — except there is no console fallback either.

A node with no config is in maintenance mode: it has booted, taken a DHCP lease, and is serving the Talos API without a client CA to check against, because the CA does not exist yet. That is the one and only window where --insecure is valid. You push the machine config, the node writes it to disk, installs Talos onto the chosen disk, and reboots into a configured state. After that, every call needs the client certificate.

Talos bootstrap flow from talosctl gen config through apply-config and bootstrap to a working kubeconfig

The step people get wrong is talosctl bootstrap. Applying config to three control-plane nodes does not form a cluster — it produces three machines each waiting for an etcd cluster to exist. bootstrap is the command that says “you are member one, create the etcd cluster.” It runs against exactly one node, exactly once, for the life of the cluster. The other control-plane nodes discover that etcd and join it. Workers never get bootstrapped at all; they wait for the Kubernetes API to answer and then register their kubelet.

Step-by-step

  1. Find the real install disk before generating anything. Boot a machine from the Talos ISO or image, note the address it picked up, and ask it what disks it has. This works in maintenance mode, before any config exists.
talosctl get disks --insecure --nodes 10.10.20.11
NODE   NAMESPACE   TYPE   ID       VERSION   SIZE     READ ONLY   TRANSPORT   ROTATIONAL   MODEL
       runtime     Disk   sda      1         214 GB   false       virtio      true
       runtime     Disk   sdb      1         1.1 TB   false       virtio      true

Pick the disk you want Talos installed on. If nothing comes back, the node is not in maintenance mode or port 50000 is filtered.

  1. Generate the machine config. The first argument is a cluster name, the second is the endpoint clients will use to reach the Kubernetes API. Run this in an empty directory — it writes files into the working directory.
talosctl gen config sh-prod https://10.10.20.10:6443 \
  --install-disk /dev/sda \
  --kubernetes-version 1.34.1
generating PKI and tokens
created controlplane.yaml
created worker.yaml
created talosconfig

controlplane.yaml and worker.yaml contain the cluster secrets in plain text. talosconfig is your client certificate. Treat all three as credentials, store them in your secret manager, and never commit them. If you want the secret bundle separated so you can regenerate configs later without rotating the CA, generate it first with talosctl gen secrets and pass it back with --with-secrets secrets.yaml.

  1. Point talosctl at the cluster. Set the endpoint (where the API calls are sent) and the default node list so you stop typing addresses.
export TALOSCONFIG=$PWD/talosconfig
talosctl config endpoint 10.10.20.11
talosctl config node 10.10.20.11

There is no output on success. talosctl config info will echo the current context back if you want to confirm.

  1. Apply config to the first control-plane node. This is the --insecure call — the only one in the whole guide.
talosctl apply-config --insecure \
  --nodes 10.10.20.11 \
  --file controlplane.yaml

The command returns immediately with no output. The node writes the config, installs Talos to /dev/sda, and reboots. Watch it happen:

talosctl dmesg --nodes 10.10.20.11 --follow

You are looking for task installSystem and then task startAllServices lines. The node will then sit there logging etcd connection failures, which is expected — etcd does not exist yet.

  1. Apply config to the remaining control-plane nodes. Same file, different addresses. They will also sit and wait.
talosctl apply-config --insecure --nodes 10.10.20.12 --file controlplane.yaml
talosctl apply-config --insecure --nodes 10.10.20.13 --file controlplane.yaml
  1. Bootstrap etcd — once, on one node. Pick the first control-plane node and only that one.
talosctl bootstrap --nodes 10.10.20.11

No output means it worked. Running this a second time returns an AlreadyExists error, which is harmless. Running it on a second node while the first is still forming its cluster is the failure that creates two independent etcd clusters and leaves you rebuilding from scratch.

Within a minute or two, the control plane static pods come up. Confirm with:

talosctl service etcd --nodes 10.10.20.11
NODE     10.10.20.11
ID       etcd
STATE    Running
HEALTH   OK
  1. Pull the kubeconfig. This asks the control plane for an admin certificate and merges it into your local kubeconfig.
talosctl kubeconfig --nodes 10.10.20.11
merging kubeconfig into "/home/you/.kube/config"

Pass a path argument (talosctl kubeconfig ./kubeconfig-sh-prod) if you would rather keep it separate.

  1. Join the workers. Apply worker.yaml in maintenance mode, exactly like the control planes. No bootstrap step.
talosctl apply-config --insecure --nodes 10.10.20.21 --file worker.yaml
talosctl apply-config --insecure --nodes 10.10.20.22 --file worker.yaml

They install, reboot, find the API endpoint from the config, and register.

  1. Use config patches instead of editing the generated YAML. Editing controlplane.yaml by hand means you cannot regenerate it. Put deltas in small patch files and apply them at generation time or afterwards. A patch that pins a static address and adds two system extensions:
# patch-net.yaml — strategic merge patch
machine:
  install:
    extensions:
      - image: ghcr.io/siderolabs/iscsi-tools:v0.1.6
  network:
    hostname: cp-1
    interfaces:
      - interface: eth0
        addresses:
          - 10.10.20.11/24
        routes:
          - network: 0.0.0.0/0
            gateway: 10.10.20.1
    nameservers:
      - 10.10.20.2

Fold it into generation, or apply it to a live node:

talosctl gen config sh-prod https://10.10.20.10:6443 \
  --install-disk /dev/sda \
  --config-patch-control-plane @patch-net.yaml

talosctl patch machineconfig --nodes 10.10.20.11 --patch @patch-net.yaml

The patch machineconfig form prints the affected node and applies the change. Network and kubelet changes usually apply without a reboot; anything under machine.install only takes effect on the next install or upgrade. Add --mode=try to test a patch with an automatic rollback if you do not confirm it.

For extensions specifically, the durable route on a real cluster is to build a custom installer image with the Sidero Image Factory and point machine.install.image at it, so the extensions survive every upgrade rather than being re-applied by hand.

Validate it works

Check the Talos side first — cluster membership as Talos sees it, which is independent of whether Kubernetes is happy:

talosctl get members --nodes 10.10.20.11
NODE          NAMESPACE   TYPE     ID     VERSION   HOSTNAME   MACHINE TYPE   OS                ADDRESSES
10.10.20.11   cluster     Member   cp-1   1         cp-1       controlplane   Talos (v1.11.2)   ["10.10.20.11"]
10.10.20.11   cluster     Member   cp-2   1         cp-2       controlplane   Talos (v1.11.2)   ["10.10.20.12"]
10.10.20.11   cluster     Member   cp-3   1         cp-3       controlplane   Talos (v1.11.2)   ["10.10.20.13"]
10.10.20.11   cluster     Member   w-1    1         w-1        worker         Talos (v1.11.2)   ["10.10.20.21"]
10.10.20.11   cluster     Member   w-2    1         w-2        worker         Talos (v1.11.2)   ["10.10.20.22"]

Then the built-in health check, which walks etcd, the control-plane static pods, kube-proxy, CoreDNS, and node readiness:

talosctl health --nodes 10.10.20.11
discovered nodes: ["10.10.20.11" "10.10.20.12" "10.10.20.13" "10.10.20.21" "10.10.20.22"]
waiting for etcd to be healthy: OK
waiting for apid to be ready: OK
waiting for all nodes memory sizes: OK
waiting for all k8s nodes to report ready: OK
waiting for all control plane components to be ready: OK

Finally, the Kubernetes view:

kubectl get nodes -o wide
NAME   STATUS   ROLES           AGE   VERSION
cp-1   Ready    control-plane   9m    v1.34.1
cp-2   Ready    control-plane   8m    v1.34.1
cp-3   Ready    control-plane   8m    v1.34.1
w-1    Ready    <none>          6m    v1.34.1
w-2    Ready    <none>          6m    v1.34.1

Upgrades are two separate operations. Talos itself, node by node:

talosctl upgrade --nodes 10.10.20.21 \
  --image ghcr.io/siderolabs/installer:v1.11.3

Kubernetes, cluster-wide, driven from any control-plane node:

talosctl upgrade-k8s --nodes 10.10.20.11 --to 1.34.2 --dry-run
talosctl upgrade-k8s --nodes 10.10.20.11 --to 1.34.2

The dry run prints the plan and flags deprecated resources before anything changes. Move one Kubernetes minor version at a time — the same rule as any Kubernetes cluster upgrade.

Troubleshooting

certificate signed by unknown authority on every command. Your TALOSCONFIG does not match the cluster’s CA. This happens after a second talosctl gen config run in the same directory overwrites talosconfig with a freshly minted CA that the running nodes have never seen. There is no recovery from the node side. Restore the original talosconfig from your secret store, or reinstall the nodes.

The node never leaves maintenance mode after apply-config. Almost always a bad --install-disk. Talos cannot install to a disk that does not exist, so it logs the failure and stays where it is. Read the reason:

talosctl dmesg --nodes 10.10.20.11 | grep -i install

Re-run talosctl get disks --insecure and apply a corrected config.

etcd never becomes healthy on the second and third control-plane nodes. Check whether they can actually reach 2379/2380 on the first node, and check clock skew — etcd Raft is intolerant of drift. Look at what the service itself is saying rather than guessing:

talosctl logs etcd --nodes 10.10.20.12 --tail 50

Two etcd clusters after a rebuild. The symptom is talosctl get members showing a different membership depending on which node you query. This is bootstrap having run more than once. There is no safe merge. Wipe the extra control-plane nodes with talosctl reset --graceful=false --reboot and re-apply their config so they join the surviving cluster. If you have an etcd snapshot, restoring from it is the faster path.

A node is unreachable and you cannot shell in. You do not need to. talosctl dmesg gives you kernel and boot logs, talosctl logs <service> gives you a specific service, talosctl containers --kubernetes lists pods at the runtime level, and talosctl dashboard gives you a live TUI with node metrics and logs. If the API itself is down, the machine console (hypervisor console or IPMI) shows the Talos boot screen, which reports the current state and any config error — that is your last resort, and it is read-only.

When this is the wrong approach

Talos trades flexibility for a smaller surface. If your workload needs a host agent, a kernel module, or a vendor daemon installed onto the OS, you either find or build a system extension for it, or Talos is the wrong platform — there is no apt install escape hatch. Teams with a heavy investment in configuration management (Ansible playbooks, CIS hardening scripts, an existing golden-image pipeline) will find that none of it carries over.

It is also a poor fit if the machines run anything other than Kubernetes. Talos is a single-purpose OS; a box that also needs to run a database outside the cluster or a legacy service is better served by a general distribution and kubeadm. And if your team’s operational muscle memory is entirely SSH-and-grep, budget for the retraining honestly — the first outage is a bad time to discover nobody knows how to read talosctl logs.

For the full command surface and the machine config reference, see the Talos Linux documentation.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.