Autoscale worker nodes on a cluster to increase or decrease the number of resources available. Autoscaling for worker nodes is configured in the machine pool definition if you are configuring an existing cluster.

Additionally, you can configure autoscaling on the default machine pool when you create the cluster using interactive mode.

Enabling autoscaling nodes in an existing cluster

Configure autoscaling to dynamically scale the number of worker nodes up or down based on load.

Successful autoscaling is dependent on having the correct AWS resource quotas in your AWS account. Verify resource quotas and request quota increases from the AWS console.

Procedure
  1. To identify the machine pool IDs in a cluster, enter the following command:

    $ rosa list machinepools --cluster=<cluster_name>
    Example output
    ID        AUTOSCALING   REPLICAS    INSTANCE TYPE  LABELS    TINTS   AVAILABILITY ZONES
    default   No            2           m5.xlarge                        us-east-1a
    mp1       No            2           m5.xlarge                        us-east-1a

    Decide which machine pool ID you want to configure.

  2. To enable autoscaling on a machine pool, enter the following command:

    $ rosa edit machinepool --cluster=<cluster_name> <machinepool_ID> --enable-autoscaling --min-replicas=<number> --max-replicas=<number>
    Example

    Enable autoscaling on a machine pool with the ID mp1 on a cluster named mycluster, with the number of replicas set to scale between 2 and 5 worker nodes:

    $ rosa edit machinepool --cluster=mycluster mp1 --enable-autoscaling --min-replicas=2 --max-replicas=5