This section describes the
MachinePool resource used in the Container
Cloud API for all types of supported cloud providers.
MachinePool resource describes the parameters of a machine pool
and machines assigned to it.
For demonstration purposes, the Container Cloud
custom resource (CR) can be split into the following major sections:
The Container Cloud
MachinePool custom resource (CR) contains the following
Object type that is
metadata object field of the
MachinePool resource contains
the following fields:
Name of the
Container Cloud project in which the
MachinePoolobject has been created. Any machine assigned to this machine pool will be created in the same project.
Key-value pairs attached to the object:
Provider type that matches the provider type in the
Region name that matches the region name in the
Cluster name that this machine pool is linked to.
For the control plane role of machines assigned to the machine pool, this label contains any value, for example,
For the worker role, this label is absent.
Machines assigned to a machine pool have the same
labelsas their machine pool.
cluster.sigs.k8s.io/control-plane: "true" # remove for pool of workers
spec field of the
MachinePool object contains the following fields:
Policy used to identify nodes for deletion when downscaling. Defaults to
never, which is currently the only supported value.
Required number of machines assigned to the machine pool.
Manually decrease replicas count when you unassign a machine from a pool with positive replicas count using the Container Cloud API.
If you decrease the replicas count, extra machines are not deleted automatically. Therefore, manually delete extra machines from the pool to match the decreased replicas count.
Deleting a machine assigned to a pool without decreasing replicas count causes automatic machine recreation.
If you increase the replicas count, additional machines are created automatically.
Value used to fill the
specfield of machines created for the machine pool. The field is provider-specific, for details see the
Machineobject API documentation of a particular provider.
MachinePoolobject causes the corresponding change in the spec of every machine assigned to the pool. Therefore, edit it with caution.
Configuration example (OpenStack):
machineSpec: #here goes example spec for an OpenStack machine
- displayName: Stacklight
status field of the
MachinePool object contains the following
Most recent observed number of machines assigned to the machine pool.
Number of ready machines assigned to the machine pool.