This is a cache of https://docs.okd.io/4.8/machine_management/deleting-machine.html. It is a snapshot of the page at 2024-11-25T00:54:45.593+0000.
Deleting a machine | Machine management | OKD 4.8
×

You can delete a specific machine.

Deleting a specific machine

You can delete a specific machine.

You cannot delete a control plane machine.

Prerequisites
  • Install an OKD cluster.

  • Install the OpenShift CLI (oc).

  • Log in to oc as a user with cluster-admin permission.

Procedure
  1. View the machines that are in the cluster and identify the one to delete:

    $ oc get machine -n openshift-machine-api

    The command output contains a list of machines in the <clusterid>-worker-<cloud_region> format.

  2. Delete the machine:

    $ 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 in preventing the machine from being deleted. You can skip draining the node by annotating "machine.openshift.io/exclude-node-draining" in a specific machine. If the machine being deleted belongs to a machine set, a new machine is immediately created to satisfy the specified number of replicas.

Additional resources