Skip to content

Commit 3e5d7e9

Browse files
committed
OSDOCS#11960: Migrating destroying hosted clusters
1 parent 0c75505 commit 3e5d7e9

14 files changed

+235
-4
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,6 +2472,8 @@ Topics:
24722472
File: hcp-destroy-virt
24732473
- Name: Destroying a hosted cluster on IBM Z
24742474
File: hcp-destroy-ibmz
2475+
- Name: Destroying a hosted cluster on non-bare metal agent machines
2476+
File: hcp-destroy-non-bm
24752477
- Name: Manually importing a hosted control plane cluster
24762478
File: hcp-import
24772479
---
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="hcp-destroy-aws"]
33
include::_attributes/common-attributes.adoc[]
4-
= Destroying a hosted cluster on AWS
4+
= Destroying a hosted cluster on {aws-short}
55
:context: hcp-destroy-aws
66

7-
toc::[]
7+
toc::[]
8+
9+
You can destroy a hosted cluster and its managed cluster resource on {aws-first} by using the command-line interface (CLI).
10+
11+
include::modules/hcp-destroy-aws-cli.adoc[leveloffset=+1]

hosted_control_planes/hcp-destroy/hcp-destroy-bm.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ include::_attributes/common-attributes.adoc[]
55
:context: hcp-destroy-bm
66

77
toc::[]
8+
9+
You can destroy hosted clusters on bare metal by using the command-line interface (CLI) or the {mce-short} web console.
10+
11+
include::modules/destroy-hc-bm-cli.adoc[leveloffset=+1]
12+
include::modules/destroy-hc-bm-console.adoc[leveloffset=+1]

hosted_control_planes/hcp-destroy/hcp-destroy-ibmz.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ include::_attributes/common-attributes.adoc[]
55
:context: hcp-destroy-ibmz
66

77
toc::[]
8+
9+
You can destroy a hosted cluster on `x86` bare metal with {ibm-z-title} compute nodes and its managed cluster resource by using the command-line interface (CLI).
10+
11+
include::modules/destroy-hc-ibmz-cli.adoc[leveloffset=+1]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="hcp-destroy-non-bm"]
3+
include::_attributes/common-attributes.adoc[]
4+
= Destroying a hosted cluster on non-bare metal agent machines
5+
:context: hcp-destroy-non-bm
6+
7+
toc::[]
8+
9+
You can destroy hosted clusters on non-bare metal agent machines by using the command-line interface (CLI) or the {mce-short} web console.
10+
11+
include::modules/destroy-hc-non-bm-cli.adoc[leveloffset=+1]
12+
13+
include::modules/destroy-hc-non-bm-console.adoc[leveloffset=+1]

hosted_control_planes/hcp-destroy/hcp-destroy-virt.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9+
You can destroy a hosted cluster and its managed cluster resource on {VirtProductName} by using the command-line interface (CLI).
10+
11+
include::modules/destroy-hc-virt-cli.adoc[leveloffset=+1]

modules/destroy-hc-bm-cli.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-destroy/hcp-destroy-bm.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="destroy-hc-bm-cli_{context}"]
7+
= Destroying a hosted cluster on bare metal by using the CLI
8+
9+
You can use the `hcp` command-line interface (CLI) to destroy a hosted cluster on bare metal.
10+
11+
.Procedure
12+
13+
* Delete the hosted cluster and its backend resources by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ hcp destroy cluster agent --name <hosted_cluster_name> <1>
18+
----
19+
+
20+
<1> Specify the name of your hosted cluster.

modules/destroy-hc-bm-console.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-destroy/hcp-destroy-bm.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="destroy-hc-bm-console_{context}"]
7+
= Destroying a hosted cluster on bare metal by using the web console
8+
9+
You can use the {mce-short} web console to destroy a hosted cluster on bare metal.
10+
11+
.Procedure
12+
13+
. In the console, click *Infrastructure* -> *Clusters*.
14+
15+
. On the *Clusters* page, select the cluster that you want to destroy.
16+
17+
. In the *Actions* menu, select *Destroy clusters* to remove the cluster.

modules/destroy-hc-ibmz-cli.adoc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-destroy/hcp-destroy-ibmz.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="destroy-hc-ibmz-cli_{context}"]
7+
= Destroying a hosted cluster on x86 bare metal with {ibm-z-title} compute nodes
8+
9+
You can use the command-line interface (CLI) to destroy a hosted cluster on `x86` bare metal with {ibm-z-title} compute nodes and its managed cluster.
10+
11+
.Procedure
12+
13+
. Scale the `NodePool` object to `0` nodes by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc -n <hosted_cluster_namespace> scale nodepool <nodepool_name> --replicas 0
18+
----
19+
+
20+
[IMPORTANT]
21+
====
22+
If the compute nodes are not detached from the hosted cluster or are stuck in the `Notready` state, delete the compute nodes manually by running the following command:
23+
[source,terminal]
24+
----
25+
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig delete node <compute_node_name>
26+
----
27+
====
28+
29+
. Verify the status of the compute nodes by entering the following command:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get nodes
34+
----
35+
+
36+
After the compute nodes are detached from the hosted cluster, the status of the agents is changed to `auto-assign`.
37+
38+
. Delete the agents from the cluster by running the following command:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc -n <hosted_control_plane_namespace> delete agent <agent_name>
43+
----
44+
+
45+
[NOTE]
46+
====
47+
You can delete the virtual machines that you created as agents after you delete the agents from the cluster.
48+
====
49+
50+
. Destroy the hosted cluster by running the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ hcp destroy cluster agent --name <hosted_cluster_name> --namespace <hosted_cluster_namespace>
55+
----

modules/destroy-hc-non-bm-cli.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-destroy/hcp-destroy-non-bm.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="destroy-hc-non-bm-cli_{context}"]
7+
= Destroying a hosted cluster on non-bare metal agent machines
8+
9+
You can use the `hcp` command-line interface (CLI) to destroy a hosted cluster on non-bare metal agent machines.
10+
11+
.Procedure
12+
13+
* Delete the hosted cluster and its backend resources by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ hcp destroy cluster agent --name <hosted_cluster_name> <1>
18+
----
19+
+
20+
<1> Replace `<hosted_cluster_name>` with the name of your hosted cluster.

0 commit comments

Comments
 (0)