Available as of v2.3.0

The Rancher UI supports creating, managing, and deleting HPAs. You can configure CPU or memory usage as the metric that the HPA uses to scale.

If you want to create HPAs that scale based on other metrics than CPU and memory, refer to Configuring HPA to Scale Using Custom Metrics with Prometheus.

Creating an HPA

  1. From the Global view, open the project that you want to deploy a HPA to.

  2. Click Resources > HPA.

  3. Click Add HPA.

  4. Enter a Name for the HPA.

  5. Select a Namespace for the HPA.

  6. Select a Deployment as scale target for the HPA.

  7. Specify the Minimum Scale and Maximum Scale for the HPA.

  8. Configure the metrics for the HPA. You can choose memory or CPU usage as the metric that will cause the HPA to scale the service up or down. In the Quantity field, enter the percentage of the workload’s memory or CPU usage that will cause the HPA to scale the service. To configure other HPA metrics, including metrics available from Prometheus, you need to manage HPAs using kubectl.

  9. Click Create to create the HPA.

Result: The HPA is deployed to the chosen namespace. You can view the HPA’s status from the project’s Resources > HPA view.

Get HPA Metrics and Status

  1. From the Global view, open the project with the HPAs you want to look at.

  2. Click Resources > HPA. The HPA tab shows the number of current replicas.

  3. For more detailed metrics and status of a specific HPA, click the name of the HPA. This leads to the HPA detail page.

Deleting an HPA

  1. From the Global view, open the project that you want to delete an HPA from.

  2. Click Resources > HPA.

  3. Find the HPA which you would like to delete.

  4. Click Ellipsis (…) > Delete.

  5. Click Delete to confim.

Result: The HPA is deleted from the current cluster.