Skip to content

Commit 05e35a5

Browse files
authored
Merge pull request #69678 from jeana-redhat/OCPBUGS-25807-node-delete-note
OCPBUGS-25807: Add note to clarify node delete process
2 parents 75311cc + 1608ea7 commit 05e35a5

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

modules/nodes-nodes-working-deleting.adoc

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,59 @@
66
[id="nodes-nodes-working-deleting_{context}"]
77
= Deleting nodes from a cluster
88

9-
When you delete a node using the CLI, the node object is deleted in Kubernetes,
10-
but the pods that exist on the node are not deleted. Any bare pods not
11-
backed by a replication controller become inaccessible to {product-title}.
12-
Pods backed by replication controllers are rescheduled to other available
13-
nodes. You must delete local manifest pods.
9+
To delete a node from the {product-title} cluster, scale down the appropriate `MachineSet` object.
1410

15-
.Procedure
11+
[IMPORTANT]
12+
====
13+
When a cluster is integrated with a cloud provider, you must delete the corresponding machine to delete a node. Do not try to use the `oc delete node` command for this task.
14+
====
1615

17-
To delete a node from the {product-title} cluster, edit the appropriate `MachineSet` object:
16+
When you delete a node by using the CLI, the node object is deleted in Kubernetes, but the pods that exist on the node are not deleted. Any bare pods that are not backed by a replication controller become inaccessible to {product-title}. Pods backed by replication controllers are rescheduled to other available nodes. You must delete local manifest pods.
1817

1918
[NOTE]
2019
====
21-
If you are running cluster on bare metal, you cannot delete a node by editing
22-
`MachineSet` objects. Compute machine sets are only available when a cluster is integrated with a cloud provider. Instead you must unschedule and drain the node before manually
23-
deleting it.
20+
If you are running cluster on bare metal, you cannot delete a node by editing `MachineSet` objects. Compute machine sets are only available when a cluster is integrated with a cloud provider. Instead you must unschedule and drain the node before manually deleting it.
2421
====
2522

26-
. View the compute machine sets that are in the cluster:
23+
.Procedure
24+
25+
. View the compute machine sets that are in the cluster by running the following command:
2726
+
2827
[source,terminal]
2928
----
3029
$ oc get machinesets -n openshift-machine-api
3130
----
3231
+
33-
The compute machine sets are listed in the form of <clusterid>-worker-<aws-region-az>.
32+
The compute machine sets are listed in the form of `<cluster-id>-worker-<aws-region-az>`.
33+
34+
. Scale down the compute machine set by using one of the following methods:
3435

35-
. Scale the compute machine set:
36+
** Specify the number of replicas to scale down to by running the following command:
3637
+
3738
[source,terminal]
3839
----
39-
$ oc scale --replicas=2 machineset <machineset> -n openshift-machine-api
40+
$ oc scale --replicas=2 machineset <machine-set-name> -n openshift-machine-api
4041
----
41-
+
42-
Or:
42+
43+
** Edit the compute machine set custom resource by running the following command:
4344
+
4445
[source,terminal]
4546
----
46-
$ oc edit machineset <machineset> -n openshift-machine-api
47+
$ oc edit machineset <machine-set-name> -n openshift-machine-api
4748
----
4849
+
49-
[TIP]
50-
====
51-
You can alternatively apply the following YAML to scale the compute machine set:
52-
50+
.Example output
5351
[source,yaml]
5452
----
5553
apiVersion: machine.openshift.io/v1beta1
5654
kind: MachineSet
5755
metadata:
58-
name: <machineset>
56+
# ...
57+
name: <machine-set-name>
5958
namespace: openshift-machine-api
59+
# ...
6060
spec:
61-
replicas: 2
62-
#...
61+
replicas: 2 # <1>
62+
# ...
6363
----
64-
====
65-
64+
<1> Specify the number of replicas to scale down to.

nodes/nodes/nodes-nodes-working.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ include::modules/nodes-nodes-working-deleting.adoc[leveloffset=+2]
3333
[role="_additional-resources"]
3434
.Additional resources
3535

36-
* For more information on scaling your cluster using a MachineSet,
37-
see xref:../../machine_management/manually-scaling-machineset.adoc#machineset-manually-scaling-manually-scaling-machineset[Manually scaling a MachineSet].
36+
* xref:../../machine_management/manually-scaling-machineset.adoc#machineset-manually-scaling-manually-scaling-machineset[Manually scaling a compute machine set]
3837

3938
include::modules/nodes-nodes-working-deleting-bare-metal.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)