1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00
Files
openshift-docs/modules/machine-delete.adoc

40 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-09-23 10:29:27 +02:00
// Module included in the following assemblies:
//
// * machine_management/delete-machine.adoc
[id="machine-delete_{context}"]
= Deleting a specific machine
You can delete a specific machine.
.Prerequisites
* Install an {product-title} cluster.
* Install the OpenShift CLI (`oc`).
2019-09-23 10:29:27 +02:00
* Log into `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]
2019-09-23 10:29:27 +02:00
----
$ 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]
2019-09-23 10:29:27 +02:00
----
$ oc delete machine <machine> -n openshift-machine-api
2019-09-23 10:29:27 +02:00
----
+
[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 MachineSet, a new machine is immediately created to satisfy the specified number of replicas.
====