Container Service for Kubernetes (ACK) clusters provide the Advanced Horizontal Pod Autoscaler (AHPA) component that supports predictive scaling. This topic describes how to use AHPA to configure predictive scaling.
Prerequisites
- AHPA is in invitational preview. To use AHPA, Submit a ticket to apply to be added to a whitelist.
- An ACK managed cluster is created. For more information, see Create an ACK managed cluster.
- Application Real-Time Monitoring Service (ARMS) Prometheus is enabled, and application statistics within at least seven days are collected by ARMS Prometheus. The statistics include details about the CPU and memory resources that are used by an application. For more information about how to enable ARMS Prometheus, see Enable ARMS Prometheus.
Background information
The following traditional methods are used to manage the pods of an application: manually specify the number of pods, use Horizontal Pod Autoscaler (HPA), and use CronHPA. The following table describes the disadvantages of the preceding methods.
Method | Disadvantage |
---|---|
Manually specify the number of pods | Resources are wasted during off-peak hours. Idle resources are still billed. |
HPA |
|
CronHPA |
|
- Traditional horizontal pod scaling: Scale-out activities are triggered after the amount of workloads increases. The system cannot provision pods at the earliest opportunity to handle fluctuating workloads due to the scaling delay.
- Predictive horizontal pod scaling: AHPA learns the pattern of workload fluctuations based on the historical values of specific metrics and the amount of time that a pod spent before the pod entered the Ready state. This way, AHPA can provision pods that are ready to be scheduled before a traffic spike occurs. This ensures that resources are allocated at the earliest opportunity.

Step 1: Install Application Intelligence Controller
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane of the details page, choose .
- On the Add-ons page, click the Others tab, find Application Intelligence Controller, and then click Install.
- In the Install Application Intelligence Controller message, click OK.
Step 2: Add ARMS Prometheus as a data source
Step 3: Configure AHPA
Verify the AHPA policy
In this section, an AHPA policy that uses the observer
scaling mode is used as an example to check whether AHPA works as expected.