Skip to content

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.

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
Talos rendering. The TalosCluster, the TalosNode and the secrets bundle go into the render. The result is a content-addressed config Secret. A BootAsset, the check-in and day-2 operations use it.TalosClustershared settingsTalosNodeone machineSecrets bundlespec.secretsRefRenderfor the node's versionConfig Secretmachineconfig-<node>-<digest>BootAssetconfigISOMachinecheck-in, dry runHostOperationtalosApplyConfig
One render for each node. A new config gets a new Secret. The operator never changes a config Secret.
  1. You apply the TalosCluster and its TalosNodes. The machines install.
  2. All control planes answer. The operator bootstraps etcd and records status.bootstrappedAt.
  3. The Kubernetes API answers and all members are Ready: Available=True.
  4. You raise spec.talosVersion or spec.kubernetesVersion. The operator proposes a rollout.
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-reader with the role os: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.secretsRef changes, the operator continues with this copy and sets SecretsBundleHeld=True.
FieldTypeDescription
certSANs[]stringCertSANs 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.
controlPlaneobjectControlPlane carries the settings only control-plane members render.
allowSchedulingbooleanAllowScheduling lets ordinary workloads run on control-plane nodes (the control-plane NoSchedule taint is not rendered).
vipstringVIP 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.
credentialsobjectCredentials sets the lifetime of the admin credentials the operator publishes, and whether it also publishes a read-only talosconfig.
readerTalosconfigbooleanReaderTalosconfig also publishes <cluster>-talosconfig-reader: a talosconfig with the os:reader role, for monitoring, which can read but not change a machine.
ttlstringTTL 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.
  • Rule: ttl must be at most 720h: a published credential cannot be revoked short of a CA rotation
endpointrequiredstringEndpoint 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).Pattern: ^https://[^/]+$
kubernetesVersionrequiredstringKubernetesVersion is the Kubernetes release the control plane runs.Pattern: ^v[0-9]+\.[0-9]+\.[0-9]+$
networkobjectNetwork is the cluster's pod and service networking.
cniobjectCNI selects the pod network plugin. Empty means flannel.
  • Rule: urls are required with name custom and refused otherwise
namerequiredstringCNIName selects the pod network plugin Talos deploys.flannelnonecustom
urls[]stringURLs are the manifests a custom CNI is installed from.
podSubnets[]stringPodSubnets are the pod CIDRs, primary family first. Empty selects Talos' default for the endpoint's address family.
serviceSubnets[]stringServiceSubnets are the service CIDRs, primary family first. Empty selects Talos' default for the endpoint's address family.
patches[]objectPatches 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.
  • Rule: exactly one of inline or configMapRef
configMapRefobjectConfigMapRef reads the patch from a ConfigMap key. The ConfigMap must have the label os.platform-kit.org/patch; the operator reads no other.
keyrequiredstringThe key in the object's data.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
inlinestringInline is the patch text.
registryMirrors[]objectRegistryMirrors 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[]stringEndpoints are the mirror URLs, tried in order.Bounds: at least 1 items
registryrequiredstringRegistry is the upstream registry host the mirror stands in for (docker.io, ghcr.io, factory.talos.dev), or "*" for every registry.Bounds: at least 1 characters
schematicobjectSchematic 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).
customizationobjectSchematicCustomization holds the image customization knobs.
extraKernelArgs[]stringExtraKernelArgs 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.
systemExtensionsobjectSystemExtensions bakes extensions into the image.
officialExtensions[]stringOfficialExtensions are siderolabs/* extension names (siderolabs/drbd).
secretsRefrequiredobjectSecretsRef 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.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
talosVersionrequiredstringTalosVersion 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.Pattern: ^v1\.(1[4-9]|[2-9][0-9])\.[0-9]+$

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
FieldTypeDescription
bootstrappedAtstring (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[]objectConditions: 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).
controlPlanesinteger (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.
credentialsExpireAtstring (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.
kubeconfigSecretRefobjectKubeconfigSecretRef points at the Secret (key kubeconfig) holding an admin kubeconfig minted from the bundle's Kubernetes CA.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
kubernetesVersionstringKubernetesVersion is the version the Kubernetes API reports, empty while it does not answer.
readerTalosconfigSecretRefobjectReaderTalosconfigSecretRef points at the os:reader talosconfig, when spec.credentials.readerTalosconfig asks for one.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
readyControlPlanesinteger (int32)
readyWorkersinteger (int32)
talosconfigSecretRefobjectTalosconfigSecretRef 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.
namerequiredstringThe name of the object.
namespacerequiredstringThe namespace of the object.
unassignedNodesinteger (int32)UnassignedNodes counts the TalosNodes that name this cluster but run on no machine: not handed to a Host yet, or being removed.
workersinteger (int32)

Columns of kubectl get talosclusters (the columns marked wide show only with -o wide):

ColumnValue
NAME.metadata.name
TALOS.spec.talosVersion
KUBERNETES.spec.kubernetesVersion
ENDPOINT.spec.endpoint
CP.status.readyControlPlanes
WORKERS.status.readyWorkers
AVAILABLE.status.conditions[?(@.type=="Available")].status
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)
apiVersion: os.platform-kit.org/v1alpha1
kind: TalosCluster
metadata:
name: lab
spec:
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
Terminal window
$ kubectl get talosclusters
NAME TALOS KUBERNETES ENDPOINT CP WORKERS AVAILABLE
lab v1.14.6 v1.36.2 https://10.77.0.10:6443 3 2 True