mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * rosa_learning/creating_cluster_workshop/learning-getting-started-support.adoc
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="learning-getting-started-autoscaling-cli_{context}"]
|
|
= Enabling autoscaling for an existing machine pool using the CLI
|
|
|
|
[role="_abstract"]
|
|
Cluster autoscaling can be enabled at cluster creation and when creating a new machine pool by using the `--enable-autoscaling` option.
|
|
|
|
.Procedure
|
|
. Autoscaling is set based on machine pool availability. To find out which machine pools are available for autoscaling, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa list machinepools -c <cluster-name>
|
|
----
|
|
+
|
|
*For example*:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
ID AUTOSCALING REPLICAS INSTANCE TYPE LABELS TAINTS AVAILABILITY ZONE SUBNET DISK SIZE VERSION AUTOREPAIR
|
|
workers No 2/2 m5.xlarge us-east-1f subnet-<subnet_id> 300 GiB 4.14.36 Yes
|
|
----
|
|
|
|
. Run the following command to add autoscaling to an available machine pool:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa edit machinepool -c <cluster-name> --enable-autoscaling <machinepool-name> --min-replicas=<num> --max-replicas=<num>
|
|
----
|
|
+
|
|
*For example*:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa edit machinepool -c my-rosa-cluster --enable-autoscaling workers --min-replicas=2 --max-replicas=4
|
|
----
|
|
+
|
|
The above command creates an autoscaler for the worker nodes that scales between 2 and 4 nodes depending on the resources. |