Kind · os.platform-kit.org/v1alpha1
TalosCluster
A TalosCluster is one Talos cluster: the Talos and Kubernetes versions, the endpoint and the settings that all nodes share. The operator bootstraps it one time, publishes its admin credentials and reports its health.
At a glance
Section titled “At a glance”- Group and version
os.platform-kit.org/v1alpha1- Scope
- Cluster. The cluster name is
metadata.name. - Written by
- You write the spec. The operator writes the status.
- Reconciled by
- TalosCluster controller
- Members
- Each TalosNode that names it in
spec.clusterRef. - Conditions
Bootstrapped,Available,VersionsSupported,VersionsCurrent,SecretsBundleHeld.- Sample
- talos.yaml
How it connects
Section titled “How it connects”- The TalosNode controller renders the config of each node from the cluster, the node and the secrets bundle.
- The cluster controller bootstraps etcd on the first control plane, when all control planes answer.
- It publishes an admin kubeconfig and an admin talosconfig as Secrets in
pk-metal. - The Rollout proposer compares the spec with the machines. On a difference, it proposes a TalosRollout.
- An EtcdBackupPolicy takes snapshots of its etcd.
Lifecycle
Section titled “Lifecycle”- You apply the TalosCluster and its TalosNodes. The machines install.
- All control planes answer. The operator bootstraps etcd and records
status.bootstrappedAt. - The Kubernetes API answers and all members are Ready:
Available=True. - You raise
spec.talosVersionorspec.kubernetesVersion. The operator proposes a rollout.
Credentials and the bundle
Section titled “Credentials and the bundle”spec.credentials.ttl- The lifetime of the published credentials. The default is 24 hours, and the maximum is 720 hours (30 days). The operator issues new ones when less than a third of the lifetime remains.
spec.credentials.readerTalosconfig- Also publishes
<cluster>-talosconfig-readerwith the roleos:reader. Use it to monitor the cluster. status.credentialsExpireAt- When the first published credential expires. Copy it again before this time.
<cluster>-bundle-applied- The copy of the secrets bundle that the machines have. If the Secret in
spec.secretsRefchanges, the operator continues with this copy and setsSecretsBundleHeld=True.
| Field | Type | Description |
|---|---|---|
certSANs | []string | CertSANs are extra names the Kubernetes API server and the Talos API certificates must be valid for, beyond the endpoint, the VIP and the node addresses Talos adds on its own. |
controlPlane | object | ControlPlane carries the settings only control-plane members render. |
allowScheduling | boolean | AllowScheduling lets ordinary workloads run on control-plane nodes (the control-plane NoSchedule taint is not rendered). |
vip | string | VIP is a shared address the control-plane members announce over layer 2 (Talos' Layer2VIPConfig). Each control-plane node carries it on the link whose static address shares a subnet with it. |
credentials | object | Credentials sets the lifetime of the admin credentials the operator publishes, and whether it also publishes a read-only talosconfig. |
readerTalosconfig | boolean | ReaderTalosconfig also publishes <cluster>-talosconfig-reader: a talosconfig with the os:reader role, for monitoring, which can read but not change a machine. |
ttl | string | TTL is how long a published admin kubeconfig and talosconfig are valid. A credential is minted again once less than a third of it is left. Default 24h, at most 720h (30 days): a longer one stays valid long after the person who copied it has gone.
|
endpointrequired | string | Endpoint is the Kubernetes API URL every member enrolls against and the admin kubeconfig names: the control-plane VIP or a DNS name for it, with the port (https://10.77.0.10:6443). |
kubernetesVersionrequired | string | KubernetesVersion is the Kubernetes release the control plane runs. |
network | object | Network is the cluster's pod and service networking. |
cni | object | CNI selects the pod network plugin. Empty means flannel.
|
namerequired | string | CNIName selects the pod network plugin Talos deploys.flannelnonecustom |
urls | []string | URLs are the manifests a custom CNI is installed from. |
podSubnets | []string | PodSubnets are the pod CIDRs, primary family first. Empty selects Talos' default for the endpoint's address family. |
serviceSubnets | []string | ServiceSubnets are the service CIDRs, primary family first. Empty selects Talos' default for the endpoint's address family. |
patches | []object | Patches apply to every node, in order, after the operator's own rendering and before the node's patches. A document that Talos allows on control planes only (KubeAuditPolicyConfig, KubeAPIServerConfig) reaches the control planes only: the operator leaves it out of a worker's configuration.
|
configMapRef | object | ConfigMapRef reads the patch from a ConfigMap key. The ConfigMap must have the label os.platform-kit.org/patch; the operator reads no other. |
keyrequired | string | The key in the object's data. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
inline | string | Inline is the patch text. |
registryMirrors | []object | RegistryMirrors redirect image pulls, one entry per upstream registry. A site without internet access needs them before the first node installs, which is why they live here rather than in a patch someone has to remember. |
endpointsrequired | []string | Endpoints are the mirror URLs, tried in order. |
registryrequired | string | Registry is the upstream registry host the mirror stands in for (docker.io, ghcr.io, factory.talos.dev), or "*" for every registry. |
schematic | object | Schematic is the installer image customization every node uses unless it sets its own (a node's schematic replaces this one, it does not merge with it). |
customization | object | SchematicCustomization holds the image customization knobs. |
extraKernelArgs | []string | ExtraKernelArgs append to the image's kernel command line, for example where to put the console (console=ttyS0, what the BMC's serial-over-LAN shows). Do not add talos.config=metal-iso: the operator adds it to the boot medium itself, and the installed system must not carry it. |
systemExtensions | object | SystemExtensions bakes extensions into the image. |
officialExtensions | []string | OfficialExtensions are siderolabs/* extension names (siderolabs/drbd). |
secretsRefrequired | object | SecretsRef names the Secret holding the cluster's Talos secrets bundle under key secrets.yaml, as `talosctl gen secrets` writes it. A person generates the bundle once and commits it sealed; the operator only reads it. Every certificate and key in a rendered config, and the kubeconfig and talosconfig the operator publishes, derive from it. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
talosVersionrequired | string | TalosVersion is the Talos release the cluster runs. It selects the configuration contract the render targets and the installer image tag, so it must match what the machines boot. Talos v1.14 or later. |
Status
Section titled “Status”Rules for the whole status (the API server refuses a change that breaks one):
- bootstrappedAt is write-once: a cluster that was bootstrapped stays bootstrapped
| Field | Type | Description |
|---|---|---|
bootstrappedAt | string (date-time) | BootstrappedAt is when the operator first observed this cluster's etcd running (or its Kubernetes API answering). It is the one remembered fact in this status: once set the operator never bootstraps the cluster again, so that a cluster whose control planes all lost their etcd data is restored by a person instead of silently started empty (Bootstrapped=False, reason EtcdDataLost). Write-once; starting over means deleting and re-creating the TalosCluster. |
conditions | []object | Conditions: Bootstrapped and Available; VersionsSupported (the Kubernetes version against the Talos version), VersionsCurrent (what the machines and the API run against the spec) and SecretsBundleHeld (an edited secrets bundle the machines do not run yet). |
controlPlanes | integer (int32) | ControlPlanes and Workers count the TalosNodes that name this cluster and that a machine is handed (a Host's spec.os names them); the Ready counts are the ones whose Ready condition is True. A TalosNode with no machine yet, or one being removed, is counted in UnassignedNodes instead: it is not a member, so it does not hold Available at False. |
credentialsExpireAt | string (date-time) | CredentialsExpireAt is when the first of the published credentials expires. The operator mints new ones well before; a time in the past means it could not. |
kubeconfigSecretRef | object | KubeconfigSecretRef points at the Secret (key kubeconfig) holding an admin kubeconfig minted from the bundle's Kubernetes CA. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
kubernetesVersion | string | KubernetesVersion is the version the Kubernetes API reports, empty while it does not answer. |
readerTalosconfigSecretRef | object | ReaderTalosconfigSecretRef points at the os:reader talosconfig, when spec.credentials.readerTalosconfig asks for one. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
readyControlPlanes | integer (int32) | |
readyWorkers | integer (int32) | |
talosconfigSecretRef | object | TalosconfigSecretRef points at the Secret (key talosconfig) holding an admin talosconfig minted from the bundle's Talos CA, with every control-plane address as an endpoint. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
unassignedNodes | integer (int32) | UnassignedNodes counts the TalosNodes that name this cluster but run on no machine: not handed to a Host yet, or being removed. |
workers | integer (int32) |
Columns of kubectl get talosclusters (the columns marked wide show only with -o wide):
| Column | Value |
|---|---|
NAME | .metadata.name |
TALOS | .spec.talosVersion |
KUBERNETES | .spec.kubernetesVersion |
ENDPOINT | .spec.endpoint |
CP | .status.readyControlPlanes |
WORKERS | .status.readyWorkers |
AVAILABLE | .status.conditions[?(@.type=="Available")].status |
Conditions
Section titled “Conditions”| Condition | True means | Reasons when not True |
|---|---|---|
Bootstrapped |
etcd runs. | AwaitingControlPlane, NoControlPlane, BootstrapRefused, EtcdDataLost, EtcdUnavailable, EtcdDataPresent, RestorePending |
Available |
The Kubernetes API answers and all members are Ready. | NotBootstrapped, KubernetesUnreachable, NodesNotReady |
VersionsSupported |
The Talos version supports the Kubernetes version. | UnsupportedVersionPair |
VersionsCurrent |
All nodes and the API server run the versions of the spec. | VersionsBehind |
SecretsBundleHeld |
The operator holds the applied bundle, because spec.secretsRef changed. |
BundleApplied (False: no difference) |
Example
Section titled “Example”apiVersion: os.platform-kit.org/v1alpha1kind: TalosClustermetadata: name: labspec: talosVersion: v1.14.6 kubernetesVersion: v1.36.2 endpoint: https://10.77.0.10:6443 controlPlane: vip: 10.77.0.10 secretsRef: namespace: pk-metal name: lab-talos-secrets$ kubectl get talosclustersNAME TALOS KUBERNETES ENDPOINT CP WORKERS AVAILABLElab v1.14.6 v1.36.2 https://10.77.0.10:6443 3 2 True