CreateAutoscalingConfig
Create an auto scaling policy to automatically add or remove compute resources based on configured scaling rules to handle your cluster's workload. You can specify metrics and thresholds, scaling order, a cooldown period, and more.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateAutoscalingConfig |
create |
*Cluster
|
None | None |
Request syntax
POST /cluster/{ClusterId}/autoscale/config/ HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
cdde1f21ae22e483ebcb068a6eb7f**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| cool_down_duration |
string |
No |
The cool-down duration for scale-in events. This is the time interval from when the system detects a node is eligible for a scale-in to when the scale-in operation is executed. Valid values: 1 to 60. Unit: minutes. Default value: 10. |
10 |
| unneeded_duration |
string |
No |
The stabilization window. This is the period after a scale-out event during which the scaler does not perform scale-in operations. Valid values: 1 to 60. Unit: minutes. Default value: 10. |
10 |
| utilization_threshold |
string |
No |
The utilization threshold for a scale-in, which is the ratio of requested resources to the total allocatable resources on a node. A node is eligible for a scale-in only when both its CPU and memory utilization fall below this threshold. Valid values: [0.1, 1]. Default value: 0.5 (50%). |
0.5 |
| gpu_utilization_threshold |
string |
No |
The GPU utilization threshold for a scale-in on GPU nodes, which is the ratio of requested resources to total allocatable resources on a node. A GPU node is eligible for a scale-in only if its CPU, memory, and GPU utilization all fall below this threshold. Valid values: [0.1, 1]. Default value: 0.3 (30%). |
0.3 |
| scan_interval |
string |
No |
The frequency at which the system checks for scaling conditions. Valid values: 15, 30, 60, 120, 180, and 300. Unit: seconds. Default value: 60. |
30 |
| scale_down_enabled |
boolean |
No |
Specifies whether to allow node scale-in operations. Valid values:
Valid values:
|
true |
| expander |
string |
No |
The strategy for selecting a node pool for a scale-out when multiple node pools are available. Valid values:
Valid values:
|
least-waste |
| skip_nodes_with_system_pods |
boolean |
No |
Controls whether
Valid values:
|
true |
| skip_nodes_with_local_storage |
boolean |
No |
Controls whether
Valid values:
|
false |
| daemonset_eviction_for_nodes |
boolean |
No |
Specifies whether
Valid values:
|
false |
| max_graceful_termination_sec |
integer |
No |
The maximum duration in seconds that Unit: seconds. Default value: 14400. |
14400 |
| min_replica_count |
integer |
No |
The minimum number of Pods that must remain for any ReplicaSet after a scale-in operation. Nodes will not be scaled-in if doing so would violate this minimum. Default value: 0. |
0 |
| recycle_node_deletion_enabled |
boolean |
No |
Specifies whether to delete the Kubernetes Node object after a node is successfully scaled-in using fast scaling mode. For more information, see Scaling modes. Default value: false. Valid values:
Valid values:
|
false |
| scale_up_from_zero |
boolean |
No |
Controls whether
Valid values:
|
true |
| scaler_type |
string |
No |
The type of scaler to use. In clusters that run Kubernetes 1.24 or later, the default is goatscaler. In clusters that run an earlier version, the default is cluster-autoscaler. Valid values:
Valid values:
|
goatscaler |
| priorities |
object |
No |
Configures the priorities for scaling groups. This is used when the The priority must be a positive integer from 1 to 100. A larger value indicates a higher priority. |
|
|
array |
No |
The IDs of scaling groups that have the same priority. |
||
|
string |
No |
The ID of a scaling group. |
asg-bp1fe63lqz****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| cluster_id |
string |
The cluster ID. |
cc212d04dfe184547bffaa596******** |
| task_id |
string |
The task ID. |
T-5fd211e924e1d007******** |
| request_id |
string |
The request ID. |
AF8BE105-C32B-1269-9774-5510******** |
Examples
Success response
JSON format
{
"cluster_id": "cc212d04dfe184547bffaa596********",
"task_id": "T-5fd211e924e1d007********",
"request_id": "AF8BE105-C32B-1269-9774-5510********"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.