Updating an AS Configuration
Auto Scaling (AS) enables elastic scaling of nodes in a node pool based on scaling policies. Without this function, you have to manually adjust the number of nodes in a node pool.
Notes and Constraints
To enable AS, the CCE Cluster Autoscaler add-on 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, 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, a maximum of one CPU usage-based rule, and a maximum of one memory usage-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 a rule based on the CPU allocation rate and a periodic rule are configured and both the rules meet the scale-out conditions, the periodic rule executed early changes the node pool to the scaling state. As a result, the metric-based rule cannot be executed. After the periodic rule is executed and the node pool status becomes normal, the metric-based rule will not be executed. 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 upper limit of the cluster scale, the upper limit of the nodes supported in a node pool, or the upper limit of the nodes of a specific flavor, a 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 × 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: The number of nodes in a node pool will always be within the range during auto scaling.
- Cooldown Period: a period during which the nodes added to the current node pool cannot be scaled in.
Auto Scaling Object
- Custom rules: Click Add Rule. In the dialog box displayed, configure parameters. You can add multiple node scaling policies, a maximum of one CPU usage-based rule, and a maximum of one memory usage-based rule. The total number of rules cannot exceed 10.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.