1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/machine-delete.adoc
2022-06-24 20:01:55 +00:00

46 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * machine_management/delete-machine.adoc
// * windows_containers/removing-windows-nodes.adoc
:_content-type: PROCEDURE
[id="machine-delete_{context}"]
= Deleting a specific machine
You can delete a specific machine.
[NOTE]
====
You cannot delete a control plane machine.
====
.Prerequisites
* Install an {product-title} cluster.
* Install the OpenShift CLI (`oc`).
* Log in to `oc` as a user with `cluster-admin` permission.
.Procedure
. View the machines that are in the cluster and identify the one to delete:
+
[source,terminal]
----
$ oc get machine -n openshift-machine-api
----
+
The command output contains a list of machines in the `<clusterid>-worker-<cloud_region>` format.
. Delete the machine:
+
[source,terminal]
----
$ oc delete machine <machine> -n openshift-machine-api
----
+
[IMPORTANT]
====
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.
====