Skip to content

Command · pk-metal

pk-metal bootstrap

changes machinesno cluster necessary

pk-metal bootstrap starts etcd on a new Talos cluster and waits until each node is ready. It works without the operator. It talks to the Talos API of the nodes directly.

pk-metal bootstrap --dir <manifests> --secrets <secrets.yaml|-> [flags]

The command takes no arguments.

FlagDefaultDescription
--dir<string>required-Directory with TalosCluster/TalosNode manifests.
--endpoint<string>-Address of --node (default: its spec.address or first static address).
--node<string>-Drive only this TalosNode (default: every node in --dir).
--secrets<file>required-Secrets bundle from talosctl gen secrets, or - for stdin.
--timeout<duration>15m0sOverall deadline: bootstrap retries, readiness.

--endpoint needs --node.

  1. The command reads the manifests and the secrets bundle, as pk-metal render does.
  2. It makes a talosconfig with a short life.
  3. It bootstraps etcd on the control planes. It tries again until etcd runs.
  4. It waits until each node runs and is ready.
  5. It stops with an error when the time of --timeout ends.

You can run the command again. It does not bootstrap a cluster a second time.

pk-metal bootstrap
pk-metal bootstrap --dir manifests/ --secrets secrets.yaml
bootstrap: cp-1 running and ready
bootstrap: cp-2 running and ready
bootstrap: cp-3 running and ready
bootstrap: OK: lab is bootstrapped and its nodes are ready

Work on one node only, at an address that is not in its manifest.

Terminal window
pk-metal bootstrap --dir manifests/ --secrets secrets.yaml --node cp-1 --endpoint 10.0.0.11

The command reads files, not objects in the cluster: the TalosCluster and TalosNode manifests in --dir. On the nodes, it uses the authenticated Talos API to bootstrap etcd and to read the state.

With the operator, the TalosCluster controller bootstraps the cluster.

CodeMeaning
0Success.
1Error; the message is on stderr, as "pk-metal: <message>".