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.
Before you start
Section titled “Before you start”- You have the TalosCluster and TalosNode files of the cluster in one directory. See Define a cluster.
- You have the secrets bundle from
talosctl gen secrets. - Your workstation, or a host that runs pk-metal relay, can reach the BMCs. The BMCs can reach it back.
- You have the BMC password of each machine.
- Each BMC has two virtual media slots. pk-metal check shows the slots: two lines that are not
dialect=none. - You have the URL of a Talos installer ISO that reads its configuration from a medium. Step 1 makes it.
-
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.yamlid=$(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" -
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-clusterconfigThe directory has one
<node>.yamlfor each node, atalosconfigand akubeconfig. Thetalosconfigand thekubeconfigare 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. -
Put the BMC password of the first machine in the environment.
Terminal window read -rs PK_METAL_BMC_PASSWORD && export PK_METAL_BMC_PASSWORD -
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.
-
Find the other slot. Note its id.
Terminal window pk-metal check https://192.0.2.21 -
Boot the first machine into its config.
--mediais the slot from step 5.--listenis 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.21The 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. -
Examine the console of the machine. It must start the installer and not an operating system that is on the disk.
-
Do step 3 to step 7 for each other machine.
-
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.yamlThe last line is
bootstrap: OK: prod is bootstrapped and its nodes are ready.
If the BMCs cannot reach your workstation
Section titled “If the BMCs cannot reach your workstation”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.
ssh -L 9443:127.0.0.1:9443 relay-hostpk-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.21Verify
Section titled “Verify”kubectl --kubeconfig ~/prod-clusterconfig/kubeconfig get nodesEach node is Ready.
If it fails
Section titled “If it fails”| 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. |
Related
Section titled “Related”- pk-metal render, pk-metal boot, pk-metal bootstrap, pk-metal relay
- Pivot the operator moves the operator onto the new cluster.