Skip to main content
Omni parses, validates, and converts cluster templates into Omni resources. It then creates or updates these resources via the Omni API. Omni guarantees backward compatibility for cluster templates, so you can use the same template with any future version of Omni. Store all referenced files in machine configuration patches relative to the current working directory.

Structure

A cluster template is a YAML file consisting of multiple documents. Each document contains a kind field that specifies the document type. Some documents also include a name field that specifies the document ID.
Each cluster template must have exactly one document of kind: Cluster, kind: ControlPlane, and any number of kind: Workers with different names. Either a ControlPlane or Workers document must reference every Machine document.

Document types

The following sections describe the specific document kinds available in a cluster template and their configurations.

Cluster

The Cluster document specifies the cluster configuration and labels. It defines the cluster name and base component versions.
Cluster templates that use machineClass do not support kernelArgs. Defining them at the cluster or machine set level will cause validation errors.

ControlPlane

The ControlPlane document specifies the control plane configuration. It defines the number of control plane nodes and the list of machines to use. Because control plane machines run an etcd cluster, use a number of machines that can achieve a stable quorum (e.g., 1, 3, 5). Changing the set of machines in the control plane triggers a rolling scale-up or scale-down. Configure the control plane with at least a single machine. For high availability, SideroLabs recommends using at least 3 machines.

Workers

The Workers document specifies the worker configuration. It defines the number of worker nodes and the list of machines to use.

MachineClass

The MachineClass section of ControlPlane or Workers defines the rule for picking the machines in the machine set.
The size field supports keyword unlimited|infinity, which makes the machine set pick all available machines from the specified machine class.

UpdateStrategy

The UpdateStrategy section of Workers defines the update, delete, or upgrade strategy for the machine set.

Machine

The Machine document specifies the install disk and machine-specific configuration patches. They are optional, but either a ControlPlane or Workers document must reference every Machine document.
When Talos is not installed and you do not specify the install disk, Omni tries to pick the install disk automatically. It finds the smallest disk larger than 5GB.

Common fields

The following configuration fields are shared across multiple document types.

patches

The patches field lists machine configuration patches to apply to a cluster, a machine set, or an individual machine. Config patches modify the configuration before it is applied to each machine in the cluster. Changing configuration patches modifies the machine configuration, which gets automatically applied to the machine.
A configuration patch may be either inline or file based. Inline patches are useful for small changes, while file-based patches are useful for more complex changes or changes shared across multiple clusters.

kubernetes.manifests

The manifests field under kubernetes in the Cluster document lets you define Kubernetes workloads to deploy directly from the cluster template. Omni stores the manifest data and synchronizes it to the cluster once the Kubernetes API is available and the cluster is healthy. For full usage details and examples, see Sync Kubernetes Manifests.

kubernetes.healthchecks

The healthchecks field under kubernetes in the Cluster document defines advanced healthchecks that gate Talos Linux upgrades. Each entry is a Kubernetes Job that Omni runs in the workload cluster before upgrading the next node. While any healthcheck is failing or still running, Omni holds the upgrade.
For full usage details and examples, see Gate Talos Upgrades with Healthchecks.

kernelArgs

You can define kernel args at the cluster, machine set, or individual machine level. Management of kernel args by cluster templates is opt-in: the templates manage them ONLY IF you specify them and they are not null. Otherwise, their lifecycle remains outside of cluster template management. When defined at multiple levels, the lowest/most specific level takes precedence. For example, a kernel arg defined at the machine level overrides the same kernel arg defined at the cluster or machine set level. These args are only supported for “static” machines. If a machine is created from a machine class, kernel args management is not supported. This means setting them in a ControlPlane or Workers document that uses machineClass, or in a Cluster document that contains machine sets based on machineClass, will result in an error.