Skip to content

Commit de5aba2

Browse files
committed
Allow default machinepool to be removed when another machinepool exists
1 parent a578c87 commit de5aba2

11 files changed

+298
-109
lines changed

modules/creating-a-machine-pool.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
:_content-type: CONCEPT
66
[id="creating_a_machine_pool_{context}"]
77
= Creating a machine pool
8-
98
A default machine pool is created when you install a {product-title} (ROSA) cluster. After installation, you can create additional machine pools for your cluster by using {cluster-manager} or the ROSA CLI (`rosa`).
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="deleting-machine-pools-cli{context}"]
7+
= Deleting a machine pool using the ROSA CLI
8+
You can delete a machine pool for your Red Hat OpenShift Service on AWS (ROSA) cluster by using the ROSA CLI.
9+
10+
.Prerequisites
11+
12+
ifdef::openshift-rosa[]
13+
* You created a ROSA cluster.
14+
* The cluster is in the ready state.
15+
* You have an existing machine pool without any taints and with at least two instances for a single-AZ cluster or three instances for a multi-AZ cluster.
16+
endif::openshift-rosa[]
17+
ifndef::openshift-rosa[]
18+
* You have created an {product-title} cluster.
19+
endif::[]
20+
21+
.Procedure
22+
. From the ROSA CLI, run the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ rosa delete machinepool -c=<cluster_name> <machine_pool_ID>
27+
----
28+
+
29+
.Example output
30+
[source,terminal]
31+
----
32+
? Are you sure you want to delete machine pool <machine_pool_ID> on cluster <cluster_name>? (y/N)
33+
----
34+
. Enter 'y' to delete the machine pool.
35+
+
36+
The selected machine pool is deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
4+
// * nodes/rosa-managing-worker-nodes.adoc
5+
// * osd_cluster_admin/osd_nodes/osd-managing-worker-nodes.adoc
6+
7+
:_content-type: PROCEDURE
8+
[id="deleting-machine-pools-ocm{context}"]
9+
ifndef::openshift-rosa[]
10+
= Deleting a machine pool
11+
endif::openshift-rosa[]
12+
ifdef::openshift-rosa[]
13+
= Deleting a machine pool using OpenShift Cluster Manager
14+
endif::openshift-rosa[]
15+
16+
You can delete a machine pool for your Red Hat OpenShift Service on AWS (ROSA) cluster by using OpenShift Cluster Manager.
17+
18+
.Prerequisites
19+
20+
ifdef::openshift-rosa[]
21+
* You created a ROSA cluster.
22+
* The cluster is in the ready state.
23+
* You have an existing machine pool without any taints and with at least two instances for a single-AZ cluster or three instances for a multi-AZ cluster.
24+
endif::openshift-rosa[]
25+
ifndef::openshift-rosa[]
26+
* You have created an {product-title} cluster.
27+
* The newly created cluster is in the ready state.
28+
endif::[]
29+
30+
.Procedure
31+
. From {cluster-manager-url}, navigate to the *Clusters* page and select the cluster that contains the machine pool that you want to delete.
32+
33+
. On the selected cluster, select the *Machine pools* tab.
34+
35+
. Under the *Machine pools* tab, click the options menu {kebab} for the machine pool that you want to delete.
36+
. Click Delete.
37+
38+
The selected machine pool is deleted.

modules/deleting-machine-pools.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="deleting-machine-pools{context}"]
7+
= Deleting a machine pool
8+
9+
You can delete a machine pool in the event that your workload requirements have changed and your current machine pools no longer meet your needs.
10+
// Over time, users may find that their workload needs have changed, and may want to modify the various machine pool settings. While many of these settings can be modified, certain settings (for example, instance types and availability zones) cannot be changed once a machine pool is created. If a user finds that these settings are no longer meeting their needs, they can delete the machine pool in question and create a new machine pool with the desired settings.
11+
You can delete machine pools using the
12+
ifdef::openshift-rosa[]
13+
Openshift Cluster Manager or the ROSA CLI (`rosa`).
14+
endif::openshift-rosa[]
15+
ifndef::openshift-rosa[]
16+
Openshift Cluster Manager.
17+
endif::[]
18+
19+
// Users that wish to delete the default machine pool that is automatically created during the installation of a {product-title} (ROSA) cluster can do so using the OCM or ROSA CLI.
20+
//
21+
22+
ifndef::openshift-rosa[]
23+
.Prerequisites
24+
25+
* You have created an {product-title} cluster.
26+
* The cluster is in the ready state.
27+
* You have an existing machine pool without any taints and with at least two instances for a single-AZ cluster or three instances for a multi-AZ cluster.
28+
29+
.Procedure
30+
. From {cluster-manager-url}, navigate to the *Clusters* page and select the cluster that contains the machine pool that you want to delete.
31+
32+
. On the selected cluster, select the *Machine pools* tab.
33+
34+
. Under the *Machine pools* tab, click the options menu {kebab} for the machine pool that you want to delete.
35+
. Click *Delete*.
36+
37+
The selected machine pool is deleted.
38+
endif::openshift-rosa[]

modules/rosa-adding-taints-cli.adoc

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
4+
// * nodes/rosa-managing-worker-nodes.adoc
5+
// * osd_cluster_admin/osd_nodes/osd-managing-worker-nodes.adoc
6+
7+
:_content-type: PROCEDURE
8+
[id="rosa-adding-taints-cli{context}"]
9+
= Adding taints to a machine pool using the ROSA CLI
10+
11+
You can add taints to a machine pool for your Red Hat OpenShift Service on AWS (ROSA) cluster by using the ROSA CLI.
12+
13+
.Prerequisites
14+
15+
ifdef::openshift-rosa[]
16+
* You installed and configured the latest AWS (`aws`), ROSA (`rosa`), and OpenShift (`oc`) CLIs on your workstation.
17+
* You logged in to your Red Hat account by using the `rosa` CLI.
18+
* You created a {product-title} (ROSA) cluster.
19+
endif::openshift-rosa[]
20+
ifndef::openshift-rosa[]
21+
* You created an {product-title} cluster.
22+
endif::[]
23+
* You have an existing machine pool that does not contain any taints and contains at least two instances.
24+
25+
.Procedure
26+
27+
ifdef::openshift-rosa[]
28+
. List the machine pools in the cluster by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ rosa list machinepools --cluster=<cluster_name>
33+
----
34+
+
35+
.Example output
36+
+
37+
[source,terminal]
38+
----
39+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES
40+
Default No 2 m5.xlarge us-east-1a N/A
41+
db-nodes-mp No 2 m5.xlarge us-east-1a No
42+
----
43+
44+
. Add or update the taints for a machine pool:
45+
46+
* To add or update taints for a machine pool that does not use autoscaling, run the following command:
47+
+
48+
[source,terminal]
49+
----
50+
$ rosa edit machinepool --cluster=<cluster_name> \
51+
--replicas=<replica_count> \ <1>
52+
--taints=<key>=<value>:<effect>,<key>=<value>:<effect> \ <2>
53+
<machine_pool_id>
54+
----
55+
<1> For machine pools that do not use autoscaling, you must provide a replica count when adding taints. If you do not specify the `--replicas` argument, you are prompted for a replica count before the command completes. If you deployed {product-title} (ROSA) using a single availability zone, the replica count defines the number of compute nodes to provision to the machine pool for the zone. If you deployed your cluster using multiple availability zones, the count defines the total number of compute nodes in the machine pool across all zones and must be a multiple of 3.
56+
<2> Replace `<key>=<value>:<effect>,<key>=<value>:<effect>` with a key, value, and effect for each taint, for example `--taints=key1=value1:NoSchedule,key2=value2:NoExecute`. Available effects include `NoSchedule`, `PreferNoSchedule`, and `NoExecute`.This list overwrites any modifications made to node taints on an ongoing basis.
57+
+
58+
The following example adds taints to the `db-nodes-mp` machine pool:
59+
+
60+
[source,terminal]
61+
----
62+
$ rosa edit machinepool --cluster=mycluster --replicas 2 --taints=key1=value1:NoSchedule,key2=value2:NoExecute db-nodes-mp
63+
----
64+
+
65+
.Example output
66+
[source,terminal]
67+
----
68+
I: Updated machine pool 'db-nodes-mp' on cluster 'mycluster'
69+
----
70+
71+
* To add or update taints for a machine pool that uses autoscaling, run the following command:
72+
+
73+
[source,terminal]
74+
----
75+
$ rosa edit machinepool --cluster=<cluster_name> \
76+
--min-replicas=<minimum_replica_count> \ <1>
77+
--max-replicas=<maximum_replica_count> \ <1>
78+
--taints=<key>=<value>:<effect>,<key>=<value>:<effect> \ <2>
79+
<machine_pool_id>
80+
----
81+
<1> For machine pools that use autoscaling, you must provide minimum and maximum compute node replica limits. If you do not specify the arguments, you are prompted for the values before the command completes. The cluster autoscaler does not reduce or increase the machine pool node count beyond the limits that you specify. If you deployed ROSA using a single availability zone, the `--min-replicas` and `--max-replicas` arguments define the autoscaling limits in the machine pool for the zone. If you deployed your cluster using multiple availability zones, the arguments define the autoscaling limits in total across all zones and the counts must be multiples of 3.
82+
<2> Replace `<key>=<value>:<effect>,<key>=<value>:<effect>` with a key, value, and effect for each taint, for example `--taints=key1=value1:NoSchedule,key2=value2:NoExecute`. Available effects include `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. This list overwrites any modifications made to node taints on an ongoing basis.
83+
+
84+
The following example adds taints to the `db-nodes-mp` machine pool:
85+
+
86+
[source,terminal]
87+
----
88+
$ rosa edit machinepool --cluster=mycluster --min-replicas=2 --max-replicas=3 --taints=key1=value1:NoSchedule,key2=value2:NoExecute db-nodes-mp
89+
----
90+
+
91+
.Example output
92+
[source,terminal]
93+
----
94+
I: Updated machine pool 'db-nodes-mp' on cluster 'mycluster'
95+
----
96+
97+
.Verification
98+
99+
. List the available machine pools in your cluster by running the following command:
100+
+
101+
[source,terminal]
102+
----
103+
$ rosa list machinepools --cluster=<cluster_name>
104+
----
105+
+
106+
.Example output
107+
[source,terminal]
108+
----
109+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES SPOT INSTANCES
110+
Default No 2 m5.xlarge us-east-1a N/A
111+
db-nodes-mp No 2 m5.xlarge key1=value1:NoSchedule, key2=value2:NoExecute us-east-1a No
112+
----
113+
114+
. Verify that the taints are included for your machine pool in the output.
115+
endif::[]

modules/rosa-adding-taints-ocm.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc
4+
// * nodes/rosa-managing-worker-nodes.adoc
5+
// * osd_cluster_admin/osd_nodes/osd-managing-worker-nodes.adoc
6+
7+
:_content-type: PROCEDURE
8+
[id="rosa-adding-taints-ocm{context}"]
9+
= Adding taints to a machine pool using Openshift Cluster Manager
10+
11+
You can add taints to a machine pool for your Red Hat OpenShift Service on AWS (ROSA) cluster by using OpenShift Cluster Manager.
12+
13+
.Prerequisites
14+
15+
ifndef::openshift-rosa[]
16+
* You created an OpenShift Dedicated cluster.
17+
endif::[]
18+
ifdef::openshift-rosa[]
19+
* You created a Red Hat OpenShift Service on AWS (ROSA) cluster.
20+
endif::[]
21+
* You have an existing machine pool that does not contain any taints and contains at least two instances.
22+
23+
.Procedure
24+
25+
//ifdef::openshift-dedicated[]
26+
. Navigate to {cluster-manager-url} and select your cluster.
27+
. Under the *Machine pools* tab, click the options menu {kebab} for the machine pool that you want to add a taint to.
28+
. Select *Edit taints*.
29+
. Add *Key* and *Value* entries for your taint.
30+
. Select an *Effect* for your taint from the drop-down menu. Available options include `NoSchedule`, `PreferNoSchedule`, and `NoExecute`.
31+
. Optional: Select *Add taint* if you want to add more taints to the machine pool.
32+
. Click *Save* to apply the taints to the machine pool.
33+
34+
.Verification
35+
36+
. Under the *Machine pools* tab, select *>* next to your machine pool to expand the view.
37+
. Verify that your taints are listed under *Taints* in the expanded view.
38+
//endif::[]

0 commit comments

Comments
 (0)