Command · pk-metal
pk-metal render
changes no machineno cluster necessary
pk-metal render makes the Talos machine configuration of each node from files on your workstation.
It does not talk to the cluster, to a BMC or to a machine.
Synopsis
Section titled “Synopsis”pk-metal render --dir <manifests> --secrets <secrets.yaml|-> [flags]The command takes no arguments.
| Flag | Default | Description |
|---|---|---|
--credentials-ttl<duration> | 24h0m0s | Lifetime of the admin talosconfig and kubeconfig (at most 720h); they cannot be revoked short of a CA rotation. |
--dir<string>required | - | Directory with TalosCluster/TalosNode (and patch ConfigMap) manifests. |
--image-factory<string> | factory.talos.dev | Image factory host the installer image is named on. |
--no-credentials | false | Write the node configs only, no admin talosconfig or kubeconfig. |
--out<string> | clusterconfig | Output directory: <node>.yaml per node, talosconfig, kubeconfig. |
--register | false | Tell the image factory about each schematic (needs network); off computes ids offline. |
--secrets<file>required | - | Secrets bundle from talosctl gen secrets, or - for stdin. |
What it does
Section titled “What it does”- The command reads the manifests in
--dir: one TalosCluster, its TalosNodes and the ConfigMaps with patches. - It reads the secrets bundle. Make the bundle with
talosctl gen secrets. - It computes the installer image of each node from the schematic and the Talos version.
- It renders one machine configuration for each node, with the patches of the cluster and of the node.
- It writes the files into
--out. It sets the mode of the directory to0700and of each file to0600, also when they existed before. Only you can read the files.
| File | Content |
|---|---|
<node>.yaml |
The machine configuration of one node. |
talosconfig |
The administrator client configuration for talosctl. The certificate is valid for --credentials-ttl, 24 hours by default. |
kubeconfig |
The administrator kubeconfig of the new cluster. The certificate is valid for --credentials-ttl. |
With --no-credentials, the command writes the node configurations only.
--credentials-ttl is 720 hours at most. Nobody can revoke these certificates without a rotation of the cluster CA. A short life limits the damage of a copy that leaks.
Without --register, the command computes the schematic id offline. The network is not necessary.
With --register, it also sends each schematic to the image factory.
Examples
Section titled “Examples”talosctl gen secrets -o secrets.yaml
pk-metal render --dir manifests/ --secrets secrets.yaml
rendered 5 node configs, talosconfig and kubeconfig (valid 24h0m0s) for lab into clusterconfig
ls clusterconfig
cp-1.yaml cp-2.yaml cp-3.yaml kubeconfig talosconfig w-1.yaml w-2.yaml
Read the secrets bundle from stdin, for example from a secret store.
sops -d secrets.enc.yaml | pk-metal render --dir manifests/ --secrets - --out ~/clusterconfigObjects
Section titled “Objects”The command reads files, not objects in the cluster. The files have the same form as the objects:
| File content | Purpose |
|---|---|
| TalosCluster | Versions, endpoint and cluster patches. |
| TalosNode | Role, address, install disk, links and node patches. |
| ConfigMap | The patches that the cluster and the nodes name. Each has the label os.platform-kit.org/patch. |
In the cluster, the TalosNode controller renders the same configuration.
Exit status
Section titled “Exit status”Related
Section titled “Related”- pk-metal boot boots a machine into one rendered configuration.
- pk-metal bootstrap starts the cluster on the machines.
- Bootstrap without the operator
- Talos rendering
- Air-gapped site uses
--image-factory.