{{site.data.keyword.attribute-definition-list}}

Enabling the cluster autoscaler add-on in your cluster

You can enable the add-on from the console or the command line.

Because the cluster autoscaler doesn't recognize GPU labels, it can't scale up or down based on GPU consumption.

Enabling the cluster autoscaler add-on from the console

  1. From the {{site.data.keyword.openshiftlong_notm}} cluster dashboard, select the cluster where you want to enable autoscaling.
  2. In the Add-ons section, locate the Cluster Autoscaler add-on and click Install

Enabling the cluster autoscaler add-on from the CLI

  1. Update the container-service plug-in to the most recent version.

    ibmcloud update && ibmcloud plugin update container-service
    
  2. Enable the cluster-autoscaler add-on by running the following command.

    ibmcloud oc cluster addon enable cluster-autoscaler --cluster CLUSTER_NAME
    

    Example output

    Enabling add-on `cluster-autoscaler` for cluster <cluster_name>...
    The add-on might take several minutes to deploy and become ready for use.
    OK
    
  3. Verify that the add-on is installed and Ready.

    ibmcloud oc cluster addon ls --cluster <cluster_name>
    

    Example output

    NAME                 Version   Health State   Health Status   
    cluster-autoscaler   1.0.1     normal         Addon Ready
    
  4. No worker pools are configured for scaling after enabling the add-on. To set up autoscaling on your worker pools, edit the cluster autoscaler configmap.

Updating the cluster autoscaler add-on

The cluster autoscaler has two types of updates.

Patch updates
Patch updates are delivered automatically by IBM and don't contain any feature updates or changes in the supported add-on and cluster versions.
Release updates
Release updates contain new features for the cluster autoscaler or changes in the supported add-on or cluster versions. You must manually apply release updates to your cluster autoscaler add-on.

To update the cluster autoscaler add-on:

  1. Check the version of the cluster autoscaler add-on that is deployed in your cluster. If an update is available, review the release notes for the latest add-on version.

    ibmcloud oc cluster addon ls --cluster <cluster_name>
    

    If you upgrade your cluster to a version that isn't supported by the cluster autoscaler add-on, your apps might experience downtime and your cluster might not scale.

  2. Update the cluster autoscaler add-on.

    ibmcloud oc cluster addon update cluster-autoscaler --version <version-to-update> --cluster <cluster_name>
    
  3. Verify the add-on is successfully updated and Ready.

    ibmcloud oc cluster addon ls --cluster <cluster_name>
    

Removing the cluster autoscaler add-on from the console

  1. Edit the autoscaler ConfigMap to stop scaling your working pools.

  2. From the {{site.data.keyword.openshiftlong_notm}} cluster dashboard, select the cluster where you want to enable autoscaling.

  3. Locate the Cluster Autoscaler add-on and click Uninstall

Removing the cluster autoscaler add-on from the CLI

  1. Edit the autoscaler ConfigMap to stop scaling your working pools.

  2. Disable the cluster-autoscaler add-on.

    ibmcloud oc cluster addon disable cluster-autoscaler --cluster <cluster_name>
    
  3. Verify that the add-on was removed.

    ibmcloud oc cluster addon ls --cluster <cluster_name>