Horizontal Pod Autoscaling (HPA) in Kubernetes implements horizontal scaling of pods. In a CCE HPA policy, you can configure different cooldown time windows and scaling thresholds for different applications based on the Kubernetes HPA.
The metrics-server add-on has been installed. This add-on collects public metrics of kubelet in Kubernetes clusters, including the CPU usage and memory usage.
For clusters of v1.19.10 and later, if an HPA policy is used to scale out a workload with EVS volume mounted, a new pod cannot be started because EVS disks cannot be attached.
If the add-ons have been installed, after you click Create HPA Policy, you will directly land on the second step to configure the policy. The first step (checking the add-ons) has been completed almost instantly.
Parameter |
Description |
---|---|
Policy Name |
Name of the policy to be created. Set this parameter as required. |
Cluster Name |
Cluster to which the workload belongs. |
Namespace |
Namespace to which the workload belongs. |
Associated Workload |
Workload with which the HPA policy is associated. |
Pod Range |
Minimum and maximum numbers of pods. When a policy is triggered, the workload pods are scaled within this range. |
Cooldown Period |
Interval between a scale-in and a scale-out. The unit is minute. The interval cannot be shorter than 1 minute. This parameter is available only for clusters of v1.15 and later. It is not supported in clusters of v1.13 or earlier. This parameter indicates the interval between consecutive scaling operations. The cooldown period ensures that a scaling operation is initiated only when the previous one is completed and the system is running stably. |
Rules |
Policy rules can be based on system metrics. System metrics
You can click Add Rule again to add more scaling policies. NOTE:
When calculating the number of pods to be added or reduced, the HPA policy uses the maximum metrics values in the last 5 minutes. |