Skip to content

Commit e47ff85

Browse files
author
Amrita
committed
added annotation to delete a node
1 parent d5f1ec6 commit e47ff85

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

modules/machineset-manually-scaling.adoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@ $ oc get machinesets -n openshift-machine-api
2828
+
2929
The machine sets are listed in the form of `<clusterid>-worker-<aws-region-az>`.
3030

31+
. View the machines that are in the cluster:
32+
+
33+
[source,terminal]
34+
----
35+
$ oc get machine -n openshift-machine-api
36+
----
37+
38+
. Set the annotation on the machine that you want to delete:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc annotate machine/<machine_name> -n openshift-machine-api machine.openshift.io/cluster-api-delete-machine="true"
43+
----
44+
45+
. Cordon and drain the node that you want to delete:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc adm cordon <node_name>
50+
$ oc adm drain <node_name>
51+
----
52+
3153
. Scale the machine set:
3254
+
3355
[source,terminal]
@@ -59,3 +81,12 @@ spec:
5981
====
6082
+
6183
You can scale the machine set up or down. It takes several minutes for the new machines to be available.
84+
85+
.Verification
86+
87+
* Verify the deletion of the intended machine:
88+
+
89+
[source,terminal]
90+
----
91+
$ oc get machines
92+
----

0 commit comments

Comments
 (0)