The CCE Cluster Autoscaler add-on is built on the Autoscaler component of the community. It can automatically adjust the number of cluster nodes based on the resource needs of applications, optimizing resource utilization and performance. Autoscaler is the main controller in Kubernetes. It can automatically scale nodes in or out based on resource requirements. When there are not enough node resources to schedule pods in a cluster, Autoscaler adds more nodes with additional resources for those pods. Furthermore, if the resource utilization of the added nodes is low, Autoscaler will automatically remove them. For details about how to implement node auto scaling, see Creating a Node Auto Scaling Policy.
Open-source community: https://github.com/kubernetes/autoscaler
Autoscaler controls auto scale-out and scale-in.
You can choose either of the following methods:
Auto scale-out will be performed when:
The add-on follows the "No Less, No More" policy. For example, if three cores are required for creating a pod and the system supports four-core and eight-core nodes, Autoscaler will preferentially create a four-core node.
If a node's pre-allocated CPUs and memory remain below the scale-in threshold for a sustained period (10 minutes by default), the cluster initiates a scale-in operation, automatically deleting the underutilized node. However, a node cannot be deleted from a cluster if the following pods exist:
There are three types of preset specifications based on the cluster scale. You can select one as required. The system will configure the number of pods and resource quotas for the add-on based on the selected preset specifications. You can see the configurations on the console.
If your cluster is large and the preset specifications do not meet your needs, you can customize the resource specifications and estimate the number of pods in the cluster to better determine the memory usage of the add-on. The recommended memory request and limit in typical large clusters can be calculated as follows:
For example, if there are 20,000 pods and the YAML file size of each pod is 10 KB, the memory request would be 6.6 GiB (2 × 10 × 0.28 GiB + 1 GiB) and the memory limit would be 8.6 GiB (6.6 GiB + 2 GiB). (The calculated values may differ from the recommendations listed in Table 1. You can refer to that table or use these formulas.)
Number of Pods (10 KB for Each Pod YAML) | Recommended Memory Request | Recommended Memory Limit |
|---|---|---|
10000 | 4 GiB | 6 GiB |
30000 | 8 GiB | 10 GiB |
50000 | 16 GiB | 18 GiB |
80000 | 24 GiB | 26 GiB |
100000 | 28 GiB | 30 GiB |
Parameter | Description |
|---|---|
Multi-AZ Deployment |
|
Node Affinity |
|
Toleration | Using both taints and tolerations allows (not forcibly) the add-on Deployment to be scheduled to a node with the matching taints, and controls the Deployment eviction policies after the node where the Deployment is located is tainted. The add-on adds the default tolerance policy for the node.kubernetes.io/not-ready and node.kubernetes.io/unreachable taints, respectively. The tolerance time window is 60s. For details, see Configuring Tolerance Policies. |
Component | Description | Resource Type |
|---|---|---|
Autoscaler | Auto scaling for Kubernetes clusters | Deployment |