Skip to content

Day 1

Bootstrap without the operator

Make the first Talos cluster of a site from a workstation, when no management cluster exists. Later, you can Pivot the operator the operator onto this cluster.

  1. Get the installer ISO URL. The installer must have the kernel argument talos.config=metal-iso, so that it reads the configuration medium. Register a schematic with this argument at the Talos Image Factory. Use the Talos version of your cluster.

    Terminal window
    printf 'customization:\n extraKernelArgs:\n - talos.config=metal-iso\n' > schematic.yaml
    id=$(curl -sf --data-binary @schematic.yaml https://factory.talos.dev/schematics | jq -r .id)
    echo "https://factory.talos.dev/image/$id/v1.14.6/metal-amd64.iso"
  2. Render the machine configs. This touches no machine. Write the output to a directory outside your git repository: the files hold the cluster secrets.

    Terminal window
    pk-metal render --dir manifests --secrets secrets.yaml --out ~/prod-clusterconfig

    The directory has one <node>.yaml for each node, a talosconfig and a kubeconfig. The talosconfig and the kubeconfig are valid for 24 hours (--credentials-ttl, at most 720 hours). Nobody can revoke them before that time, except with a CA rotation. If the secrets bundle is encrypted, decrypt it to standard input and give --secrets -. Then no plain copy goes to the disk.

  3. Put the BMC password of the first machine in the environment.

    Terminal window
    read -rs PK_METAL_BMC_PASSWORD && export PK_METAL_BMC_PASSWORD
  4. Mount the installer ISO on the first slot of the BMC. Use the web console of the BMC, and the URL from step 1. The BMC must reach the Image Factory. If it cannot, download the ISO and serve it from a host that the BMC can reach.

  5. Find the other slot. Note its id.

    Terminal window
    pk-metal check https://192.0.2.21
  6. Boot the first machine into its config. --media is the slot from step 5. --listen is an address on your workstation that the BMC can reach.

    Terminal window
    pk-metal boot --config ~/prod-clusterconfig/cp-1.yaml --node cp-1 --media 2 --listen 192.0.2.5:8443 https://192.0.2.21

    The command shows its steps. Without --yes, it refuses to reset a machine that is on. The machine starts the installer, which installs Talos with the config to the disk.

  7. Examine the console of the machine. It must start the installer and not an operating system that is on the disk.

  8. Do step 3 to step 7 for each other machine.

  9. Start the cluster. The command bootstraps etcd one time and waits until each node is Ready.

    Terminal window
    pk-metal bootstrap --dir manifests --secrets secrets.yaml

    The last line is bootstrap: OK: prod is bootstrapped and its nodes are ready.

Run pk-metal relay on a host on the BMC network. Then give --relay to pk-metal boot in place of --listen. The relay and boot share a secret. Relay explains why.

Terminal window
ssh -L 9443:127.0.0.1:9443 relay-host
pk-metal boot --relay 127.0.0.1:9443 --relay-secret-file ./relay.secret \
--config ~/prod-clusterconfig/cp-1.yaml --node cp-1 https://192.0.2.21
Terminal window
kubectl --kubeconfig ~/prod-clusterconfig/kubeconfig get nodes

Each node is Ready.

What you see Fix
boot times out and the image was not read The BMC cannot reach --listen. Use --relay, or open the port.
The machine starts in Talos maintenance mode and waits The installer has no talos.config=metal-iso. Do step 1 again.
The machine starts the old system from its disk The boot override did not start the installer. Mount the installer on the slot that the machine starts first.
boot ejected the installer boot used the installer slot. Give the other slot with --media.
bootstrap waits for a node Read the serial console of the node. See Node not ready.
bootstrap reports data in etcd A member has old etcd data. See Bootstrap refused.