Skip to content

Commit b2c0c49

Browse files
committed
Cluster Autoscaler for ROSA HCP
1 parent e84fae5 commit b2c0c49

10 files changed

+288
-13
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,9 @@ Topics:
607607
File: dedicated-aws-dc
608608
- Name: Cluster autoscaling
609609
File: rosa-cluster-autoscaling
610+
- Name: Cluster autoscaling for ROSA HCP
611+
File: rosa-cluster-autoscaling-hcp
612+
# Remove cluster autoscaling for ROSA HCP once the HCP docs are published
610613
- Name: Manage nodes using machine pools
611614
Dir: rosa_nodes
612615
Distros: openshift-rosa

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ Topics:
374374
File: dedicated-aws-vpn
375375
- Name: Configuring AWS Direct Connect
376376
File: dedicated-aws-dc
377+
- Name: Cluster autoscaling
378+
File: rosa-cluster-autoscaling
377379
- Name: Manage nodes using machine pools
378380
Dir: rosa_nodes
379381
Topics:

modules/cluster-autoscaler-about.adoc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,42 @@
55
// * osd_cluster_admin/osd_nodes/osd-nodes-about-autoscaling-nodes.adoc
66
// * osd_cluster_admin/osd-cluster-autoscaling.adoc
77
// * rosa_cluster_admin/rosa-cluster-autoscaling.adoc
8+
// * rosa_cluster_admin/rosa-cluster-autoscaling-hcp.adoc (temporary)
9+
810

911
:_mod-docs-content-type: CONCEPT
1012
[id="cluster-autoscaler-about_{context}"]
1113
= About the cluster autoscaler
1214

1315
The cluster autoscaler adjusts the size of an {product-title} cluster to meet its current deployment needs. It uses declarative, Kubernetes-style arguments to provide infrastructure management that does not rely on objects of a specific cloud provider. The cluster autoscaler has a cluster scope, and is not associated with a particular namespace.
16+
ifdef::openshift-rosa-hcp[]
17+
In {product-title}, the Cluster Autoscaler is fully managed, which means it is hosted along with the control plane.
18+
endif::openshift-rosa-hcp[]
19+
1420

1521
The cluster autoscaler increases the size of the cluster when there are pods that fail to schedule on any of the current worker nodes due to insufficient resources or when another node is necessary to meet deployment needs. The cluster autoscaler does not increase the cluster resources beyond the limits that you specify.
1622

23+
ifdef::openshift-rosa-hcp[]
24+
The cluster autoscaler computes the total memory, CPU, and GPU only on the nodes that belong to autoscaling machine pools. All of the machine pool nodes that are not autoscaling are excluded from this aggregation. For example, if you set the `maxNodesTotal` to `50` on a {product-title} cluster with three machine pools in which a single machine pool is not autoscaling, the cluster autoscaler restricts the total nodes to `50` in only those two machine pools that are autoscaling. The single manually scaling machine pool can have additional nodes, making the overall cluster nodes total more than `50`.
25+
endif::openshift-rosa-hcp[]
26+
27+
ifndef::openshift-rosa-hcp[]
1728
The cluster autoscaler computes the total
1829
ifndef::openshift-dedicated,openshift-rosa[]
1930
memory, CPU, and GPU
20-
endif::[]
31+
endif::openshift-dedicated,openshift-rosa[]
2132
ifdef::openshift-dedicated,openshift-rosa[]
2233
memory and CPU
23-
endif::[]
34+
endif::openshift-dedicated,openshift-rosa[]
2435
on all nodes the cluster, even though it does not manage the control plane nodes. These values are not single-machine oriented. They are an aggregation of all the resources in the entire cluster. For example, if you set the maximum memory resource limit, the cluster autoscaler includes all the nodes in the cluster when calculating the current memory usage. That calculation is then used to determine if the cluster autoscaler has the capacity to add more worker resources.
36+
endif::openshift-rosa-hcp[]
2537

38+
ifndef::openshift-rosa-hcp[]
2639
[IMPORTANT]
2740
====
2841
Ensure that the `maxNodesTotal` value in the `ClusterAutoscaler` resource definition that you create is large enough to account for the total possible number of machines in your cluster. This value must encompass the number of control plane machines and the possible number of compute machines that you might scale to.
2942
====
43+
endif::openshift-rosa-hcp[]
3044

3145
[discrete]
3246
[id="cluster-autoscaler-scale-down_{context}"]

modules/rosa-cluster-autoscaler-cli-after.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@
66
[id="rosa-enable-cluster-autoscale-cli-after_{context}"]
77
= Enable autoscaling after cluster creation with the ROSA CLI
88

9+
////
910
[IMPORTANT]
1011
====
1112
The following procedure is only supported for ROSA Classic clusters. To enable autoscaling after cluster creation for ROSA with HCP clusters, see link:https://docs.openshift.com/rosa/rosa_cluster_admin/rosa_nodes/rosa-nodes-about-autoscaling-nodes.html#nodes-enabling-autoscaling-nodes[Enabling autoscaling nodes on a cluster].
1213
====
14+
////
1315

1416
You can use the ROSA CLI (`rosa`) to set cluster-wide autoscaling after cluster creation.
1517

1618
.Procedure
17-
18-
- After you have created a cluster, create the autoscaler:
19+
20+
* After you have created a cluster, create the autoscaler:
1921
+
2022
.Example
2123
[source,terminal]
2224
----
2325
$ rosa create autoscaler --cluster=<mycluster>
2426
----
2527
+
26-
.. You can also create the autoscaler with specific parameters using the following command:
28+
** You can also create the autoscaler with specific parameters using the following command:
2729
+
2830
.Example
2931
[source,terminal]

modules/rosa-cluster-autoscaler-cli-delete.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
You can delete the cluster autoscaler if you no longer want to use it.
1010

11-
- To delete the cluster autoscaler, run the following command:
11+
.Procedure
12+
13+
* To delete the cluster autoscaler, run the following command:
1214
+
1315
.Example
1416
[source,terminal]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa-cluster-autoscaling.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="rosa-cluster-autoscaler-cli-describe_{context}"]
7+
= View autoscaler configurations with the ROSA CLI
8+
9+
You can view your cluster autoscaler configurations using the `rosa describe autoscaler` command.
10+
11+
//ROSA HCP procedure
12+
ifdef::openshift-rosa-hcp[]
13+
.Procedure
14+
15+
* To view cluster autoscaler configurations, run the following command:
16+
+
17+
.Example
18+
[source,terminal]
19+
----
20+
$ rosa describe autoscaler -h --cluster=<mycluster>
21+
----
22+
endif::openshift-rosa-hcp[]
23+
24+
//ROSA Classic procedure
25+
ifdef::openshift-rosa[]
26+
.Procedure
27+
28+
* To view cluster autoscaler configurations, run the following command:
29+
+
30+
.Example
31+
[source,terminal]
32+
----
33+
$ rosa describe autoscaler --cluster=<mycluster>
34+
----
35+
endif::openshift-rosa[]

modules/rosa-cluster-autoscaler-cli-edit.adoc

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,42 @@
88

99
You can edit any specific parameters of the cluster autoscaler after creating the autoscaler.
1010

11-
- To edit the cluster autoscaler, run the following command:
11+
.Procedure
12+
13+
//ROSA HCP procedure
14+
ifdef::openshift-rosa-hcp[]
15+
* To edit the cluster autoscaler, run the following command:
16+
+
17+
.Example
18+
[source,terminal]
19+
----
20+
$ rosa edit autoscaler -h --cluster=<mycluster>
21+
----
22+
+
23+
** To edit a specific parameter, run the following command:
24+
+
25+
.Example
26+
[source,terminal]
27+
----
28+
$ rosa edit autoscaler -h --cluster=<mycluster> <parameter>
29+
----
30+
endif::openshift-rosa-hcp[]
31+
32+
//ROSA Classic procedure
33+
ifdef::openshift-rosa[]
34+
* To edit the cluster autoscaler, run the following command:
1235
+
1336
.Example
1437
[source,terminal]
1538
----
1639
$ rosa edit autoscaler --cluster=<mycluster>
1740
----
1841
+
19-
.. To edit a specific parameter, run the following command:
42+
** To edit a specific parameter, run the following command:
2043
+
2144
.Example
2245
[source,terminal]
2346
----
2447
$ rosa edit autoscaler --cluster=<mycluster> <parameter>
2548
----
49+
endif::openshift-rosa[]

modules/rosa-cluster-autoscaler-cli-settings.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ You can add the following parameters to the cluster creation command to configur
1717
|Type or Range
1818
|Example/Instruction
1919

20+
ifdef::openshift-rosa[]
21+
//Classic only
2022
|`--autoscaler-balance-similar-node-groups`
2123
|Identify node groups with the same instance type and label set, and try to balance respective sizes of those node groups.
2224
|`boolean`
@@ -31,17 +33,22 @@ You can add the following parameters to the cluster creation command to configur
3133
|Autoscaler log level. Replace _int_ in the command with the number you want to use.
3234
|`integer`
3335
|`--autoscaler-log-verbosity 4`
36+
endif::openshift-rosa[]
3437

38+
//Both Classic and HCP
3539
|`--autoscaler-max-pod-grace-period _int_`
3640
|Gives pods graceful termination time before scaling down, measured in seconds. Replace _int_ in the command with the number of seconds you want to use.
3741
|`integer`
3842
|`--autoscaler-max-pod-grace-period 0`
3943

44+
//Both Classic and HCP
4045
|`--autoscaler-pod-priority-threshold _int_`
4146
|The priority that a pod must exceed to cause the cluster autoscaler to deploy additional nodes. Replace _int_ in the command with the number you want to use, can be negative.
4247
|`integer`
4348
|`--autoscaler-pod-priority-threshold -10`
4449

50+
ifdef::openshift-rosa[]
51+
//Classic only
4552
|`--autoscaler-gpu-limit _stringArray_`
4653
|Minimum and maximum number of different GPUs in cluster. Cluster autoscaler does not scale the cluster less than or greater than these numbers. The format must be a comma-separated list of "<gpu_type>,<min>,<max>".
4754
|`array`
@@ -51,22 +58,30 @@ You can add the following parameters to the cluster creation command to configur
5158
|If set, the cluster-autoscaler ignores daemon set pods when calculating resource utilization for scaling down.
5259
|`boolean`
5360
|Add it to set to true, omit the option to set to false.
61+
endif::openshift-rosa[]
5462

63+
//Both Classic and HCP
5564
|`--autoscaler-max-node-provision-time _string_`
5665
|Maximum time that the cluster autoscaler waits for a node to be provisioned. Replace _string_ in the command with an integer and time unit (ns,us,µs,ms,s,m,h).
5766
|`string`
5867
|`--autoscaler-max-node-provision-time 35m`
5968

69+
ifdef::openshift-rosa[]
70+
//Classic only
6071
|`--autoscaler-balancing-ignored-labels _strings_`
6172
|A comma-separated list of label keys that the cluster autoscaler should ignore when comparing node groups for similarity. Replace _strings_ in the command with the relevant labels..
6273
|`string`
6374
|`--autoscaler-balancing-ignored-labels topology.ebs.csi.aws.com/zone,alpha.eksctl.io/instance-id`
75+
endif::openshift-rosa[]
6476

77+
//Both Classic and HCP
6578
|`--autoscaler-max-nodes-total _int_`
6679
|Maximum amount of nodes in the cluster, including the autoscaled nodes. Replace _int_ in the command with the number you want to use.
6780
|`integer`
6881
|`--autoscaler-max-nodes-total 180`
6982

83+
ifdef::openshift-rosa[]
84+
//Classic only
7085
|`--autoscaler-min-cores _int_`
7186
|Minimum number of cores to deploy in the cluster. Replace _int_ in the command with the number you want to use.
7287
|`integer`
@@ -116,5 +131,6 @@ You can add the following parameters to the cluster creation command to configur
116131
|How long after scale down failure that scale down evaluation resumes. Replace _string_ in the command with an integer and time unit (ns,us,µs,ms,s,m,h).
117132
|`string`
118133
|`--autoscaler-scale-down-delay-after-failure 1h`
134+
endif::openshift-rosa[]
119135

120136
|===

0 commit comments

Comments
 (0)