$ oc edit controlplanemachineset.machine.openshift.io cluster \
-n openshift-machine-api
Control plane machine sets automate several essential aspects of control plane management.
You can make changes to the configuration of the machines in the control plane by updating the specification in the control plane machine set custom resource (CR).
The Control Plane Machine Set Operator monitors the control plane machines and compares their configuration with the specification in the control plane machine set CR. When there is a discrepancy between the specification in the CR and the configuration of a control plane machine, the Operator marks that control plane machine for replacement.
For more information about the parameters in the CR, see "Control plane machine set configuration". |
Your cluster has an activated and functioning Control Plane Machine Set Operator.
Edit your control plane machine set CR by running the following command:
$ oc edit controlplanemachineset.machine.openshift.io cluster \
-n openshift-machine-api
Change the values of any fields that you want to update in your cluster configuration.
Save your changes.
For clusters that use the default RollingUpdate
update strategy, the control plane machine set propagates changes to your control plane configuration automatically.
For clusters that are configured to use the OnDelete
update strategy, you must replace your control plane machines manually.
The RollingUpdate
update strategy automatically propagates changes to your control plane configuration.
This update strategy is the default configuration for the control plane machine set.
For clusters that use the RollingUpdate
update strategy, the Operator creates a replacement control plane machine with the configuration that is specified in the CR.
When the replacement control plane machine is ready, the Operator deletes the control plane machine that is marked for replacement.
The replacement machine then joins the control plane.
If multiple control plane machines are marked for replacement, the Operator protects etcd health during replacement by repeating this replacement process one machine at a time until it has replaced each machine.
You can use the OnDelete
update strategy to propagate changes to your control plane configuration by replacing machines manually. Manually replacing machines allows you to test changes to your configuration on a single machine before applying the changes more broadly.
For clusters that are configured to use the OnDelete
update strategy, the Operator creates a replacement control plane machine when you delete an existing machine. When the replacement control plane machine is ready, the etcd Operator allows the existing machine to be deleted. The replacement machine then joins the control plane.
If multiple control plane machines are deleted, the Operator creates all of the required replacement machines simultaneously. The Operator maintains etcd health by preventing more than one machine being removed from the control plane at once.
To replace a control plane machine in a cluster that has a control plane machine set, you delete the machine manually. The control plane machine set replaces the deleted machine with one using the specification in the control plane machine set custom resource (CR).
If your cluster runs on OpenStack and you need to evacuate a compute server, such as for an upgrade, you must disable the OpenStack compute node that the machine runs on by running the following command:
$ openstack compute service set <target_node_host_name> nova-compute --disable
For more information, see Preparing to migrate in the OpenStack documentation.
List the control plane machines in your cluster by running the following command:
$ oc get machines \
-l machine.openshift.io/cluster-api-machine-role==master \
-n openshift-machine-api
Delete a control plane machine by running the following command:
$ oc delete machine \
-n openshift-machine-api \
<control_plane_machine_name> (1)
1 | Specify the name of the control plane machine to delete. |
If you delete multiple control plane machines, the control plane machine set replaces them according to the configured update strategy:
Both strategies maintain etcd health during control plane machine replacement. |