Skip to content

Commit 150f9e8

Browse files
authored
Merge pull request #69847 from jneczypor/OSDOCS-8382
OSDOCS-8382: Migrate "Getting Started with ROSA: Autoscaling" from rosaworkshop.io into product documentation
2 parents 7cf8b7e + b822ab4 commit 150f9e8

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ Topics:
149149
File: cloud-experts-getting-started-accessing
150150
- Name: Managing worker nodes
151151
File: cloud-experts-getting-started-managing-worker-nodes
152+
- Name: Autoscaling
153+
File: cloud-experts-getting-started-autoscaling
152154
- Name: Deploying an application
153155
Dir: cloud-experts-deploying-application
154156
Distros: openshift-rosa
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="cloud-experts-getting-started-autoscaling"]
3+
= Tutorial: Autoscaling
4+
include::_attributes/attributes-openshift-dedicated.adoc[]
5+
:context: cloud-experts-getting-started-autoscaling
6+
7+
toc::[]
8+
9+
//rosaworkshop.io content metadata
10+
//Brought into ROSA product docs 2024-01-04
11+
12+
The xref:../../rosa_cluster_admin/rosa_nodes/rosa-nodes-about-autoscaling-nodes.adoc#rosa-nodes-about-autoscaling-nodes[cluster autoscaler] adds or removes worker nodes from a cluster based on pod resources.
13+
14+
The cluster autoscaler increases the size of the cluster when:
15+
16+
* Pods fail to schedule on the current nodes due to insufficient resources.
17+
* Another node is necessary to meet deployment needs.
18+
19+
The cluster autoscaler does not increase the cluster resources beyond the limits that you specify.
20+
21+
The cluster autoscaler decreases the size of the cluster when:
22+
23+
* Some nodes are consistently not needed for a significant period. For example, when a node has low resource use and all of its important pods can fit on other nodes.
24+
25+
== Enabling autoscaling for an existing machine pool using the CLI
26+
27+
[NOTE]
28+
====
29+
Cluster autoscaling can be enabled at cluster creation and when creating a new machine pool by using the `--enable-autoscaling` option.
30+
====
31+
32+
. Autoscaling is set based on machine pool availability. To find out which machine pools are available for autoscaling, run the following command:
33+
+
34+
[source,terminal]
35+
----
36+
$ rosa list machinepools -c <cluster-name>
37+
----
38+
+
39+
.Example output
40+
+
41+
[source,terminal]
42+
----
43+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES
44+
Default No 2 m5.xlarge us-east-1a
45+
----
46+
47+
. Run the following command to add autoscaling to an available machine pool:
48+
+
49+
[source,terminal]
50+
----
51+
$ rosa edit machinepool -c <cluster-name> --enable-autoscaling <machinepool-name> --min-replicas=<num> --max-replicas=<num>
52+
----
53+
+
54+
.Example input
55+
+
56+
[source,terminal]
57+
----
58+
$ rosa edit machinepool -c my-rosa-cluster --enable-autoscaling Default --min-replicas=2 --max-replicas=4
59+
----
60+
+
61+
The above command creates an autoscaler for the worker nodes that scales between 2 and 4 nodes depending on the resources.
62+
63+
== Enabling autoscaling for an existing machine pool using the UI
64+
65+
[NOTE]
66+
====
67+
Cluster autoscaling can be enabled at cluster creation by checking the *Enable autoscaling* checkbox when creating machine pools.
68+
====
69+
70+
. Go to the *Machine pools* tab and click the three dots in the right..
71+
. Click *Scale*, then *Enable autoscaling*.
72+
. Run the following command to confirm that autoscaling was added:
73+
+
74+
[source,terminal]
75+
----
76+
$ rosa list machinepools -c <cluster-name>
77+
----
78+
+
79+
.Example output
80+
+
81+
[source,terminal]
82+
----
83+
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONES
84+
Default Yes 2-4 m5.xlarge us-east-1a
85+
----

0 commit comments

Comments
 (0)