Cluster Templates
Reference documentation for cluster templates.
Cluster templates are parsed, validated, and converted to Omni resources, which are then created or updated via the Omni API. Omni guarantees backward compatibility for cluster templates, so the same template can be used with any future version of Omni.
All referenced files in machine configuration patches should be stored relative to the current working directory.
Structure
The Cluster Template is a YAML file consisting of multiple documents, with each document having a kind
field that specifies the type of the document. Some documents might also have a name
field that specifies the name (ID) of the document.
Each cluster template should have exactly one document of kind: Cluster
, kind: ControlPlane
, and any number of kind: Workers
with different name
s.
Every Machine
document must be referenced by either a ControlPlane
or Workers
document.
Document Types
Cluster
Cluster
The Cluster
document specifies the cluster configuration, labels, defines the cluster name and base component versions.
Field | Type | Description |
---|---|---|
| string |
|
| string | Cluster name: only letters, digits and |
| map[string]string | Labels to be applied to the cluster. |
| map[string]string | Annotations to be applied to the cluster. |
| string | Kubernetes version to use, |
| string | Talos version to use, |
| boolean | Whether to enable the workload proxy feature. Defaults to |
| boolean | Whether to use the embedded discovery service that runs inside the Omni instance instead of the public one ( |
| boolean | Whether to enable disk encryption. Defaults to |
| string | Cluster etcd backup interval. Must be a valid Go duration. Zero |
| array | List of patches to apply to the cluster. |
| array | The list of system extensions to be installed on every machine in the cluster. |
ControlPlane
ControlPlane
The ControlPlane
document specifies the control plane configuration, defines the number of control plane nodes, and the list of machines to use.
As control plane machines run an etcd
cluster, it is recommended to use a number of machines for the control plane that can achieve a stable quorum (e.g., 1, 3, 5, etc.). Changing the set of machines in the control plane will trigger a rolling scale-up/scale-down of the control plane.
The control plane should have at least a single machine, but it is recommended to use at least 3 machines for the control plane for high-availability.
Field | Type | Description |
---|---|---|
| string |
|
| map[string]string | Labels to be applied to the control plane machine set. |
| map[string]string | Annotations to be applied to the control plane machine set. |
| array | List of machine IDs to use for control plane nodes (mutually exclusive with |
| array | List of patches to apply to the machine set. |
| Machine Class configuration (mutually exclusive with | |
| array | The list of system extensions to be installed on every machine in the machine set. |
Workers
Workers
The Workers
document specifies the worker configuration, defines the number of worker nodes, and the list of machines to use.
Field | Type | Description |
---|---|---|
| string |
|
| string | Worker machine set name: only letters, digits and |
| map[string]string | Labels to be applied to the worker machine set. |
| map[string]string | Annotations to be applied to the worker machine set. |
| array | List of machine IDs to use as worker nodes in the machine set (mutually exclusive with |
| array | List of patches to apply to the machine set. |
| Machine Class configuration (mutually exclusive with | |
| Update strategy for the machine set. Defaults to | |
| Delete strategy for the machine set. Defaults to | |
| array | The list of system extensions to be installed on every machine in the machine set. |
MachineClass
MachineClass
The MachineClass
section of the Control Plane or the Workers defines the rule for picking the machines in the machine set.
Field | Type | Description |
---|---|---|
| string | Name of the machine class to use. |
| number | Number of machines to pick from the matching machine class. |
size
field supports keyword unlimited|infinity
which makes the machine set pick all available machines from the specified machine class. {}
UpdateStrategy
UpdateStrategy
The UpdateStrategy
section of the Workers defines the update and/or the delete strategy for the machine set.
Field | Type | Description |
---|---|---|
| string | Strategy type. Can be |
| number | Maximum number of machines to update and/or delete in parallel. Only used when the |
Machine
Machine
The Machine
document specifies the install disk and machine-specific configuration patches. They are optional, but every Machine
document must be referenced by either a ControlPlane
or Workers
document.
Field | Type | Description |
---|---|---|
| string |
|
| string | Machine ID. |
| map[string]string | Labels to be applied to the machine set node. |
| map[string]string | Annotations to be applied to the machine set node. |
| string | Whether the machine should be marked as locked. Can be |
| string | Disk to install Talos on. Matters only for Talos running from ISO or iPXE. |
| array | List of patches to apply to the machine. |
| array | The list of system extensions to be installed on the machine. |
When Talos is not installed and the install disk is not specified, Omni will try to pick the install disk automatically. It will find the smallest disk which is larger than 5GB. {}
Common Fields
patches
patches
The patches
field is a list of 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.
Field | Type | Description |
---|---|---|
| string | Path to the patch file. Path is relative to the current working directory when executing |
| string | Name of the patch. Required for |
| string | Override the config patch ID, so it won't be generated from the |
| map[string]string | Labels to be applied to the config patch. |
| map[string]string | Annotations to be applied to the config patch. |
| object | Inline patch containing Talos machine configuration strategic patch. |
A configuration patch may be either inline
or file
based. Inline patches are useful for small changes, file-based patches are useful for more complex changes, or changes shared across multiple clusters.
Last updated