Structure
The Cluster Template is a YAML file consisting of multiple documents, with each document having akind field that specifies the type of the document. Some documents might also have a name field that specifies the name (ID) of the document.
kind: Cluster, kind: ControlPlane, and any number of kind: Workers with different names.
Every Machine document must be referenced by either a ControlPlane or Workers document.
Document Types
Cluster
The Cluster document specifies the cluster configuration, labels, defines the cluster name and base component versions.
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.
Workers
The Workers document specifies the worker configuration, defines the number of worker nodes, and the list of machines to use.
MachineClass
The MachineClass section of the Control Plane or the Workers defines the rule for picking the machines in the machine set.
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 the Workers defines the update and/or the delete strategy for the machine set.
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.
Common Fields
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.
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.