Updating an Auto Scaling Configuration
Auto scaling enables elastic scaling of nodes in a node pool based on configured policies. Without it, you must manually adjust the node count.
Constraints
To enable auto scaling, CCE Cluster Autoscaler must be installed in the target cluster.
Procedure
- Log in to the CCE console and click the cluster name to access the cluster console.
- In the navigation pane, choose Nodes. On the Node Pools tab, locate the row containing the target node pool and click Auto Scaling.
- If CCE Cluster Autoscaler is not installed, click Install, configure add-on parameters based on service requirements, click Install, and wait until the add-on is installed. For details about add-on configurations, see CCE Cluster Autoscaler.
- If CCE Cluster Autoscaler has been installed, configure scaling policies.
- Configure auto scaling policies.
Auto Scaling Configuration
- Custom rules: Click Add Rule. In the dialog box displayed, configure parameters. You can add multiple node scaling policies, including a maximum of one CPU-based rule and one memory-based rule. The total number of rules cannot exceed 10. The following table lists custom rules.
Table 1 Custom rules Rule Type
Configuration
Metric-based
- Trigger: Select CPU allocation rate or Memory allocation rate and enter a value. The rate must be greater than the value specified in the node resource requirements for a node scale-in when you configure a scaling policy (Configuring an Auto Scaling Policy for a Cluster). NOTE:
- Resource allocation rate (%) = Resources requested by pods in the node pool/Resources allocatable to pods in the node pool
- If multiple rules meet scaling conditions, the rules are executed in either of the following modes:
If rules based on the CPU allocation rate and memory allocation rate are configured and two or more rules meet the scale-out conditions, the rule that will add the most nodes will be executed.
If both a CPU allocation rate rule and a periodic rule are configured and both meet the scale-out conditions, the periodic rule that executes first transitions the node pool to the scaling state. This blocks the metric-based rule from executing. Scale-out continues only if the metric-based rule's conditions are still met after the periodic rule completes. If the metric-based rule is executed early, the periodic rule will be executed after the metric-based rule is executed.
- If rules based on the CPU allocation rate and memory allocation rate are configured, the policy detection period varies with the processing logic of each loop of the CCE Cluster Autoscaler add-on. A scale-out is triggered once the conditions are met, but it is constrained by other factors such as the cooldown period and node pool status.
- If the number of nodes reaches the cluster scale upper limit, the maximum node quantity range of the node pool, or the maximum node quantity range defined by the specification, metric-based scale-out will not be triggered.
- If the number of nodes, the number of vCPUs, or the amount of memory reaches the upper limit for a node scale-out, a metric-based scale-out will not be triggered.
- Action: Configure an action to be performed when the triggering conditions are met.
- Custom: Plan the number of nodes added to a node pool.
- Auto calculation: When the triggering conditions are met, nodes are automatically added and the allocation rate is restored to a value lower than the threshold. The formula is as follows:
The number of nodes to be added = Resource requests of pods in the node pool/(Available resources of a single node x Target allocation rate) - The number of current nodes + 1
Periodic
- Trigger Time: You can select a specific time every day, every week, every month, or every year.
- Action: specifies an action to be carried out when the trigger time is reached. Plan the number of nodes added to the node pool.
- Trigger: Select CPU allocation rate or Memory allocation rate and enter a value. The rate must be greater than the value specified in the node resource requirements for a node scale-in when you configure a scaling policy (Configuring an Auto Scaling Policy for a Cluster).
- Nodes: specifies the minimum number of nodes during scale-in and the maximum number of nodes during scale-out. The node pool size will always remain within this range during auto scaling, but this constraint does not apply to manual scaling.
For example, if the number of nodes in a node pool has reached the maximum, auto scaling cannot be triggered, but manual scaling is still allowed.
- Cooldown Period: a period during which the nodes added to the current node pool cannot be scaled in.
Auto Scaling Object
- Specifications: Configure whether to enable auto scaling for node flavors in a node pool. If auto scaling is disabled for a specific flavor, that flavor will be excluded from auto scaling in the node pool.
If multiple flavors are configured for a node pool, you can specify the number of nodes and the scaling priority for each flavor. Multiple flavors are supported only by add-ons v1.21.18, v1.23.19, v1.25.9, or later.
- Custom rules: Click Add Rule. In the dialog box displayed, configure parameters. You can add multiple node scaling policies, including a maximum of one CPU-based rule and one memory-based rule. The total number of rules cannot exceed 10.
- Click OK.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot