Enabling Autoscaling for an Existing Cluster

You can enable autoscaling for an existing OpenShift cluster with a new Autoscaler stack. These instructions assume you use the Assisted Installer.

Requirements for post-cluster autoscaling

Review the following requirements before configuring autoscaling.

Supported OpenShift versions

For post-cluster autoscaler configuration, use the latest create-autoscaler-operator stack. Autoscaling is supported on OpenShift Container Platform 4.22 and later. The RHCOS image used for autoscaled workers must match the OpenShift Container Platform minor version of the cluster.

Complete cluster installation

Complete the OpenShift installation before applying the autoscaler stack. For Assisted Installer clusters, complete the installation in Red Hat Hybrid Cloud Console. Autoscaled workers can't be provisioned until the cluster is installed and the autoscaling operator is running.

Existing network discovery requirements

During post-cluster autoscaler configuration, the Terraform stack requires the existing VCN and private OpenShift subnet. The stack discovers an NSG whose name matches .*lb.* and an API load balancer named <cluster_name>-openshift_api_lb. The stack doesn't provide an input for a third-party API load balancer OCID.

Install Autoscaling Operator

The procedure for installing the Autoscaling operator is similar to that for installing a new cluster.

Before you begin, ensure to review the Prerequisites section of this documentation, including the Prerequisites for Autoscaling. You must have an existing OpenShift stack that doesn't already have Autoscaling enabled.
  1. Open the navigation menu  and select Developer Services, select Stacks, and on the Stacks page, select Create Stack.
    1. Leave My configuration selected to upload your own Terraform zip.
    2. In Stack configuration upload your create-autoscaler-operator zip file. Use the zip you downloaded in Prerequisites for Autoscaling.
  2. Select Next.
  3. On the Configure variables page, review and configure the required variables for the infrastructure resources that the stack creates when you run the Apply job for this execution plan:
    • In Target Cluster, the OpenShift Tag Namespace is required for a Bare metal shape. You can find it in the created control plane instance.
    • In Existing VCN and Existing Subnets, enter the VCN and compartment of the cluster where you want to install the autoscaler.
    • Enter the PAR URL you generated in Prerequisites for Autoscaling.
  4. Enter the name, VCN, and subnet of the cluster where you want to install the autoscaler.
  5. OpenShift Tag Namespace is required for a Bare metal shape. You can find it in the created control plane instance.
  6. In the Autoscaling Configuration section, review and configure the following fields:

    Autoscaling Configuration
    Field Description
    Autoscaler Node Shape

    The instance shape of the Autoscaler compute nodes. For more information, see Compute Shapes.

    Default value: VM.Standard.E5.Flex

    Autoscaler Image Source URI The object storage URI to your Autoscaler image. You created this image as a prerequisite: see Prerequisites for Autoscaling
    Minimum Autoscaler Node Count

    The minimum number of compute nodes in the cluster.

    Default value: 0

    Maximum Autoscaler Node Count

    The maximum number of compute nodes in the cluster.

    Default value: 5

    Autoscaler Pool Identifier Optionally, enter an identifier of up to five lowercase letters, numbers, or hyphens. This identifier is appended to the CAPI cluster name when the autoscaler creates node pool resources.
    Autoscaler Node OCPU

    The number of OCPUs available for each autoscaled compute node shape. This value is only used for VMs, and is ignored for Bare Metal instances.

    Default value: 4

    Autoscaler Node Memory

    The amount of memory available, in gigabytes (GB), for each autoscaled compute node shape. This value is only used for VMs, and is ignored for Bare Metal instances.

    Default value: 24

    Cluster Network CIDR Block

    The IPV4 CIDR blocks for your OpenShift cluster network.

    Service Network CIDR Block

    The IPV4 CIDR blocks for your OpenShift service network.

  7. Select Next.
  8. On the Review page, review the stack information and variables.
  9. Select Create to create the stack. The Console redirects to the Resource Manager stacks details page for the new stack.
  10. On the stack details page, select Apply to create an apply job and provision the Autoscaling infrastructure for the cluster. After running an apply job, get the job's details to check its status. Succeeded (SUCCEEDED) indicates that the job has completed.
  11. On the job details page, select the Output tab and copy the autoscaling_manifest. Store it locally as autoscaling.yml.
  12. Apply the manifest by running the following command from the CLI:
    oc apply -f autoscaling.yml

Review Managing Autoscaling for validation and maintenance steps.