$ oc get machine -n openshift-machine-api
You can delete a specific machine.
You can delete a specific machine.
You cannot delete a control plane machine. |
Install an OpenShift Container Platform cluster.
Install the OpenShift CLI (oc
).
Log in to oc
as a user with cluster-admin
permission.
View the machines that are in the cluster by running the following command:
$ oc get machine -n openshift-machine-api
The command output contains a list of machines in the <clusterid>-<role>-<cloud_region>
format.
Identify the machine that you want to delete.
Delete the machine by running the following command:
$ oc delete machine <machine> -n openshift-machine-api
By default, the machine controller tries to drain the node that is backed by the machine until it succeeds. In some situations, such as with a misconfigured pod disruption budget, the drain operation might not be able to succeed. If the drain operation fails, the machine controller cannot proceed removing the machine. You can skip draining the node by annotating |
If the machine that you delete belongs to a machine set, a new machine is immediately created to satisfy the specified number of replicas.