Day 1
Define a cluster
Make the operator render a Talos machine config for each node of a new cluster.
Before you start
Section titled “Before you start”- You have
talosctl, at the Talos release that the cluster will run. - You have the node addresses, the gateway and the VIP. See Network checklist.
- You have the serial number of the install disk of each machine. Check a BMC or the Host inventory shows it.
-
Make the secrets bundle. Keep the file secret.
Terminal window talosctl gen secrets -o secrets.yaml -
Put the bundle into a Secret in
pk-metal. The key must besecrets.yaml.Terminal window kubectl -n pk-metal create secret generic prod-talos-secrets --from-file=secrets.yaml -
Put a copy of the file into your secret store. Then remove the plain file.
Terminal window rm secrets.yamlThe bundle has the CA keys of the cluster. Without a copy, the Secret in the management cluster is the only one. Bootstrap without the operator and pk-metal render need the file again. See Credentials.
-
Write the TalosCluster.
cluster.yaml apiVersion: os.platform-kit.org/v1alpha1kind: TalosClustermetadata:name: prodspec:talosVersion: v1.14.6kubernetesVersion: v1.36.2endpoint: https://192.0.2.100:6443controlPlane:vip: 192.0.2.100secretsRef:namespace: pk-metalname: prod-talos-secretsschematic:customization:extraKernelArgs:- console=ttyS1,115200n8 -
Write one TalosNode for each machine. Select the install disk by its serial.
cp-1.yaml apiVersion: os.platform-kit.org/v1alpha1kind: TalosNodemetadata:name: cp-1spec:clusterRef:name: prodrole: controlplaneinstallDiskSelector:serial: SIM-DISK-0001network:links:- name: lanhardwareAddr: "02:00:48:0b:80:01"addresses:- 192.0.2.11/24routes:- gateway: 192.0.2.1 -
Apply the files.
Terminal window kubectl apply -f cluster.yaml -f nodes/ -
Wait until the operator rendered each config.
Terminal window kubectl wait --for=condition=Rendered talosnode --all --timeout=120s
Options
Section titled “Options”DNS and time servers
Section titled “DNS and time servers”Without a patch, Talos uses public DNS and NTP servers. A closed site blocks them, and then a node does not become ready.
Add the two patches to spec.patches of the TalosCluster.
spec: patches: - inline: | apiVersion: v1alpha1 kind: ResolverConfig nameservers: - address: 192.0.2.53 - inline: | apiVersion: v1alpha1 kind: TimeSyncConfig ntp: servers: - ntp.example.orgControl planes without workers
Section titled “Control planes without workers”If the cluster has only control planes, set spec.controlPlane.allowScheduling: true on the TalosCluster.
Without it, ordinary pods have no node. The operator also needs such a node after a pivot.
VLANs and bonds
Section titled “VLANs and bonds”The fields of a TalosNode describe plain links. For a VLAN or a bond, add a Talos document as a patch of the TalosNode.
A link of spec.network.links is the parent. The patch uses the name of the link.
spec: patches: - inline: | apiVersion: v1alpha1 kind: VLANConfig name: lan.120 vlanID: 120 parent: lan addresses: - address: 198.51.100.11/24spec: network: links: - name: lan1 hardwareAddr: "02:00:48:0b:80:01" - name: lan2 hardwareAddr: "02:00:48:0b:80:02" patches: - inline: | apiVersion: v1alpha1 kind: BondConfig name: bond0 links: [lan1, lan2] bondMode: 802.3ad addresses: - address: 192.0.2.11/24 routes: - gateway: 192.0.2.1- The renderer accepts the two examples, and Talos validation passes. They are not tested on a machine.
- A control plane with a VIP needs a static address in the subnet of the VIP on a link of
spec.network.links. A bond patch cannot supply that address. - The Talos documentation has all fields of VLANConfig and BondConfig.
Verify
Section titled “Verify”kubectl get talosnodes -o custom-columns='NAME:.metadata.name,RENDERED:.status.conditions[?(@.type=="Rendered")].status'Each node shows True. Nothing changes on a machine until you claim it.
If it fails
Section titled “If it fails”| Condition on the TalosNode | Fix |
|---|---|
Rendered=False, SecretsUnavailable |
The Secret is missing or has no key secrets.yaml. Do step 2 again. |
Rendered=False, ClusterNotFound |
spec.clusterRef.name names no TalosCluster. |
Rendered=False, RenderFailed |
The message has the Talos validation error. Correct the patch or the field. |
Rendered=False, UnsupportedVersionPair |
Talos does not support this Kubernetes version. Change one of the two versions. |
Related
Section titled “Related”- Talos rendering explains how the config comes from the two objects.
- Air-gapped site and Behind a proxy add mirrors and patches.
- Install hosts is the next step.