Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

clusterctl Variables

clusterctl substitutes these shell-style variables when generating a cluster from templates/*.yaml (see Quick Start); the second table lists the ClusterClass topology variables of the clusterclass flavor.

VariableRequiredDefaultUsed inDescription
CLUSTER_NAMEyes-cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlName of every object.
CONTROL_PLANE_MACHINE_COUNTyes-cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlControl-plane replicas: an odd number of at least 3 keeps a maxSurge: 0 rollout available.
KUBERNETES_VERSIONyes-cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlKubeadmControlPlane and MachineDeployment version.
NAMESPACEyes-identity-libvirt.yaml, identity.yamlThe namespace allowed to use the identity; used by identity.yaml and identity-libvirt.yaml.
POD_CIDRno192.168.0.0/16cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlCluster.spec.clusterNetwork.pods.
SERVICE_CIDRno10.128.0.0/12cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlCluster.spec.clusterNetwork.services.
TERRAFORM_CLUSTER_IMAGEyescluster-template-libvirt.yaml: ghcr.io/captf-io/cluster-api-provider-terraform/libvirt-cluster:v0.1.0-opentofucluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlTerraformCluster.spec.source.image.
TERRAFORM_CP_NODE_STARTUP_TIMEOUTno1800cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlControl-plane MachineHealthCheck nodeStartupTimeoutSeconds; longer than the worker default, since kubeadm init/join plus kube-vip does strictly more work than a worker join.
TERRAFORM_CP_UNHEALTHY_TIMEOUTno3600cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlControl-plane MachineHealthCheck timeout; longer, since replacing a control-plane machine is costlier.
TERRAFORM_IDENTITY_NAMEyescluster-template-libvirt.yaml: libvirtcluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yaml, identity.yamlThe identity the cluster, and by default its machines, use.
TERRAFORM_MACHINE_IMAGEyescluster-template-libvirt.yaml: ghcr.io/captf-io/cluster-api-provider-terraform/libvirt-machine:v0.1.0-opentofucluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlTerraformMachineTemplate.spec.template.spec.source.image (control plane and workers).
TERRAFORM_NODE_STARTUP_TIMEOUTno1200cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlWorker MachineHealthCheck nodeStartupTimeoutSeconds.
TERRAFORM_UNHEALTHY_TIMEOUTno1800cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlWorker MachineHealthCheck: seconds of InfrastructureReady=False before remediation. It must exceed apply time plus one drift interval (30m by default), because the window starts when the apply starts.
TERRAFORM_VIPyes-cluster-template-libvirt.yamlThe control-plane VIP kube-vip announces; must be in 192.168.150.200-220 (cluster-template-libvirt.yaml).
WORKER_MACHINE_COUNTyes-cluster-template-clusterclass.yaml, cluster-template-libvirt.yaml, cluster-template.yamlMachineDeployment replicas.

ClusterClass topology variables

VariableRequiredTypeDescription
identityNameyesstringName of the TerraformClusterIdentity the cluster and, by default, its machines use.
clusterImageyesstringSource image of the cluster module (TerraformCluster spec.source.image).
machineImageyesstringSource image of the machine module, for control-plane and worker machines. Changing it rolls the machines out.