Create update groups for worker machines¶
Available since MCC 2.27.0 (17.2.0 and 16.2.0)
The use of update groups provides enhanced control over update of worker
machines by allowing granular concurrency settings for specific machine groups.
This feature uses the UpdateGroup
object to decouple the concurrency
settings from the global cluster level, providing flexibility based on the
workload characteristics of different machine sets.
The UpdateGroup
objects are processed sequentially based on their indexes.
Update groups with the same indexes are processed concurrently. The control
update group is always processed first.
Note
The update order of a machine within the same group is determined by the upgrade index of a specific machine. For details, see Change the upgrade order of a machine or machine pool.
The maxWorkerUpgradeCount
parameter of the Cluster
object is inherited
by the default update group. Changing maxWorkerUpgradeCount
leads to
changing the concurrentUpdates
parameter of the default update group.
Note
The maxWorkerUpgradeCount
parameter of the Cluster
object is
deprecated and will be removed in one of the following Container Cloud
releases. You can still use this parameter to change the
concurrentUpdates
value of the default update group. However, Mirantis
recommends changing this value directly in the UpdateGroup
object.
Update group for controller nodes¶
Available since MCC 2.28.0 (17.3.0 and 16.3.0) TechPreview
The update group for controller nodes is automatically generated during initial cluster creation with the following settings:
name: <cluster-name>-control
index: 1
concurrentUpdates: 1
rebootIfUpdateRequires: false
Caution
During a distribution upgrade, machines are always rebooted,
overriding rebootIfUpdateRequires: false
.
All control plane machines are automatically assigned to the update group for controller nodes with no possibility to change it.
Note
On existing clusters created before Container Cloud 2.28.0 (Cluster releases 17.2.0, 16.2.0, or earlier), the update group for controller nodes is created after Container Cloud upgrade to 2.28.0 (Cluster release 16.3.0) on the management cluster.
Caution
The index
and concurrentUpdates
parameters of the update
group for controller nodes are hardcoded and cannot be changed.
Example of the update group for controller nodes:
apiVersion: kaas.mirantis.com/v1alpha1
kind: UpdateGroup
metadata:
name: example-cluster-control
namespace: example-ns
labels:
cluster.sigs.k8s.io/cluster-name: example-cluster
spec:
index: 1
concurrentUpdates: 1
rebootIfUpdateRequires: false
Default update group¶
The default update group is automatically created during initial cluster creation with the following settings:
name: <cluster-name>-default
index: 1
rebootIfUpdateRequires: false
concurrentUpdates
: inherited from themaxWorkerUpgradeCount
parameter set in theCluster
object
Caution
During a distribution upgrade, machines are always rebooted,
overriding rebootIfUpdateRequires: false
.
Note
On existing clusters created before Container Cloud 2.27.0 (Cluster releases 17.1.0, 16.1.0, or earlier), the default update group is created after Container Cloud upgrade to 2.27.0 (Cluster release 16.2.0) on the management cluster.
Example of the default update group:
apiVersion: kaas.mirantis.com/v1alpha1
kind: UpdateGroup
metadata:
name: example-cluster-default
namespace: example-ns
labels:
cluster.sigs.k8s.io/cluster-name: example-cluster
spec:
index: 1
concurrentUpdates: 1
rebootIfUpdateRequires: false
If you require custom update settings for worker machines, create one or
several custom UpdateGroup
objects as described below.
Assign a machine to an update group using CLI¶
Note
All worker machines that are not assigned to any update group are automatically assigned to the default update group.
Create an
UpdateGroup
object with the required specification. For description of the object fields, see Container Cloud API Reference: UpdateGroup resource.Label the machines to associate them with the newly created
UpdateGroup
object:kubectl label machine <machineName> kaas.mirantis.com/update-group=<UpdateGroupObjectName>
To change the update group of a machine, update the
kaas.mirantis.com/update-group
label of the machine with the new update group name. Removing this label from a machine automatically assigns such machine to the default update group.
Note
After creation of a custom UpdateGroup
object, if you plan to
add a new machine that requires a non-default update group, manually add
the corresponding label to the machine as described above. Otherwise, the
default update group is applied to such machine.
Note
Before removing the UpdateGroup
object, reassign all machines to
another update group.