< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Edit Autoscaling Settings

This section explains how to edit autoscaling settings for workloads.

The autoscaling feature allows the system to automatically adjust the pod replica count based on the target CPU and memory usage of all replicas in the workload.

Prerequisites

You should join a cluster or a project and have the Application Workload Management permission within the cluster or the project. For more information, refer to "Cluster Roles" and "Project Roles".

Steps

  1. Log in to the KubeSphere web console with a user who has the Application Workload Management permission, and access your cluster or project.

  2. Click Application Workloads > Workloads in the left navigation pane.

  3. On the Workloads page, click Deployments or StatefulSets to open the list of workloads.

  4. On the top left of the workload details page, select More > Edit Autoscaling.

  5. In the Autoscaling dialog, set the autoscaling parameters for the workload, then click OK.

    ParameterDescription

    Target CPU Usage

    Target CPU usage for all pod replicas in the workload, measured in percentage. When the actual CPU usage is higher/lower than the target value, the system automatically decreases/increases the replica count.

    Target Memory Usage

    Target memory usage for all pod replicas in the workload, measured in MiB. When the actual memory usage is higher/lower than the target value, the system automatically decreases/increases the replica count.

    Minimum Replicas

    The minimum allowed pod replica count, with a default value of 1.

    Maximum Replicas

    The maximum allowed pod replica count, with a default value of 1.

    After the settings are complete, you can see scaling in the Status column on the Deployment or StatefulSet list page, indicating that the pod horizontal autoscaling policy has been set.

  6. On the Resource Status tab of the workload details page, click more > Cancel next to Autoscaling to delete the autoscaling settings.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.

What’s on this Page