Updates the configurations of a specified node pool based on the node pool ID.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:ModifyClusterNodePool |
update |
*Cluster
|
None | None |
Request syntax
PUT /clusters/{ClusterId}/nodepools/{NodepoolId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
c23421cfa74454bc8b37163fd19af**** |
| NodepoolId |
string |
Yes |
The node pool ID. |
p31da1b38983f4511b490fc62108a**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| nodepool_info |
object |
No |
The node pool configurations. |
|
| name |
string |
No |
The node pool name. Naming rules: The name must be 1 to 63 characters in length, and can contain digits, Chinese characters, letters, and hyphens (-). It cannot start with a hyphen (-). |
default-nodepool |
| resource_group_id |
string |
No |
The resource group ID of the node pool. Instances created by the node pool belong to this resource group. A resource can belong to only one resource group. You can map resource groups to concepts such as projects, applications, or organizations based on your business scenarios. |
rg-acfmyvw3wjm**** |
| auto_scaling |
object |
No |
The auto scaling configurations. |
|
| enable |
boolean |
No |
Specifies whether to enable auto scaling. Valid values:
If this parameter is set to false, other configuration parameters in Default value: |
true |
type
deprecated
|
string |
No |
The auto scaling type, which is classified by the auto scaling instance type. Valid values:
Default value: |
cpu |
| max_instances |
integer |
No |
The maximum number of scalable instances in the node pool, excluding existing instances. This parameter takes effect only when Valid values: [min_instances, 2000]. Default value: 0. |
10 |
| min_instances |
integer |
No |
The minimum number of scalable instances in the node pool, excluding existing instances. This parameter takes effect only when Valid values: [0, max_instances]. Default value: 0. Note
|
2 |
is_bond_eip
deprecated
|
boolean |
No |
[Deprecated] Use internet_charge_type and internet_max_bandwidth_out instead.
Default value: |
null |
eip_internet_charge_type
deprecated
|
string |
No |
[Deprecated] Use internet_charge_type and internet_max_bandwidth_out instead. The billing method of the EIP. Valid values:
Default value: |
null |
eip_bandwidth
deprecated
|
integer |
No |
[Deprecated] Use internet_charge_type and internet_max_bandwidth_out instead. The peak bandwidth of the EIP. Valid values: 1 to 100. Unit: Mbit/s. |
null |
| management |
object |
No |
The managed node pool configuration. |
|
| enable |
boolean |
No |
Specifies whether to enable the managed node pool. Valid values:
|
true |
| auto_repair |
boolean |
No |
Specifies whether to automatically repair nodes. This parameter takes effect only when enable is set to true. Valid values:
|
true |
| auto_repair_policy |
object |
No |
The auto-repair policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restarts. This parameter takes effect only when auto_repair is set to true. Valid values:
|
true |
| approval_required |
boolean |
No |
Specifies whether manual approval is required for node repairs. |
|
| auto_repair_policy_id |
string |
No |
The ID of the auto-repair policy. |
r-xxxxxxxxxx |
| max_parallel_repairing_nodes |
string |
No |
The maximum number of nodes that can be repaired in parallel. When a large number of abnormal nodes exist in the node pool, this parameter specifies the maximum number or percentage of nodes that can be repaired simultaneously. You can specify a number (such as 5, valid values: 1 to 100000) or a percentage (such as 10%, valid values: 1% to 100%). Default value: 1. |
5 |
| max_unhealthy_nodes_threshold |
string |
No |
The circuit breaker threshold for auto-repair. When the number or percentage of faulty nodes exceeds this threshold, the auto-repair process enters the circuit breaker state and stops initiating new repair actions. You can specify a number (such as 10, valid values: 1 to 100000) or a percentage (such as 20%, valid values: 1% to 100%). Default value: 100%. |
20% |
| auto_vul_fix |
boolean |
No |
Specifies whether to automatically fix CVE vulnerabilities. This parameter takes effect only when enable is set to true. Valid values:
|
true |
| auto_vul_fix_policy |
object |
No |
The automatic CVE fix policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restarts. This parameter takes effect only when auto_vul_fix is set to true. Valid values:
|
true |
| vul_level |
string |
No |
The vulnerability levels that are allowed for automatic fixing, separated by commas. Example: asap,later. Valid values:
|
asap,nntf |
| exclude_packages |
string |
No |
The packages to be excluded during vulnerability fixing. Default value: kernel. |
kernel |
| auto_upgrade |
boolean |
No |
Specifies whether to automatically upgrade nodes. This parameter takes effect only when enable is set to true. Valid values:
|
true |
| auto_upgrade_policy |
object |
No |
The automatic upgrade policy. |
|
| auto_upgrade_kubelet |
boolean |
No |
Specifies whether to allow automatic kubelet upgrades. This parameter takes effect only when auto_upgrade is set to true. Valid values:
|
true |
| auto_upgrade_runtime |
boolean |
No |
Specifies whether to allow automatic runtime upgrades. This parameter takes effect only when auto_upgrade is set to true. Valid values:
|
false |
| auto_upgrade_os |
boolean |
No |
Specifies whether to allow automatic operating system upgrades. This parameter takes effect only when auto_upgrade is set to true. Valid values:
|
false |
upgrade_config
deprecated
|
object |
No |
[Deprecated] Use the auto_upgrade parameter at the upper level instead. The automatic upgrade configuration. This parameter takes effect only when enable is set to true. |
|
auto_upgrade
deprecated
|
boolean |
No |
[Deprecated] Use the auto_upgrade parameter at the upper level instead. Specifies whether to enable automatic upgrades. Valid values:
|
true |
| surge |
integer |
No |
The number of surge nodes. This parameter and surge_percentage are mutually exclusive. Nodes become unavailable during upgrades. You can create surge nodes to compensate for the cluster load. Note
The number of surge nodes should not exceed the current number of nodes. |
5 |
| surge_percentage |
integer |
No |
The percentage of surge nodes. This parameter and surge are mutually exclusive. The number of surge nodes is calculated by multiplying the percentage by the total number of nodes. For example, if the percentage is set to 50% and the total number of nodes is 6, the number of surge nodes is 50% × 6 = 3. |
0 |
| max_unavailable |
integer |
No |
The maximum number of unavailable nodes. Valid values: 1 to 1000. Default value: 1. |
1 |
| auto_fault_diagnosis |
boolean |
No |
Specifies whether to enable ECS fault detection for node auto-repair. |
|
| drift_enabled |
boolean |
No |
Specifies whether to enable node rotation. This feature is supported only by intelligent managed node pools and is enabled by default. It is not supported by regular node pools. |
|
| scaling_group |
object |
No |
The scaling group configuration for the node pool. |
|
| vswitch_ids |
array |
No |
The list of vSwitch IDs. You can specify 1 to 8 vSwitch IDs. Note
To ensure high availability, select vSwitches in different zones. |
|
|
string |
No |
The vSwitch ID. |
vsw-wz9uwxhawmtzg7u9h**** |
|
| instance_types |
array |
No |
The list of instance types for nodes. You can select multiple instance types as backups. When a node is created, the system attempts to purchase an instance of the first instance type in the list. If the purchase fails, the system tries the next instance type until the node is created. The final instance type purchased may vary based on inventory. You can specify 1 to 10 instance types. |
|
|
string |
No |
The instance type. For more information, see Instance families. |
ecs.c6.large |
|
| instance_charge_type |
string |
No |
The billing method for nodes in the node pool. Valid values:
Default value: When you delete a node pool, scale in a node pool, or remove nodes, subscription nodes are not automatically released. Automatic release subscription nodes, change the billing method of the nodes from subscription to pay-as-you-go and then log on to the ECS console automatic release them. |
PostPaid |
| period |
integer |
No |
The subscription duration for nodes in the node pool. This parameter takes effect and is required only when
|
1 |
| period_unit |
string |
No |
The billing cycle for nodes in the node pool. This parameter takes effect and is required only when
Default value: |
Month |
| auto_renew |
boolean |
No |
Specifies whether to enable auto-renewal for nodes. This parameter takes effect only when
Default value: |
true |
| auto_renew_period |
integer |
No |
The auto-renewal period for nodes. Valid values:
Default value: 1. |
1 |
| spot_strategy |
string |
No |
The bidding strategy for spot instances. Valid values:
For more information, see Spot instances. |
SpotWithPriceLimit |
| spot_price_limit |
array<object> |
No |
The maximum price configuration for spot instances. |
|
|
object |
No |
The maximum price configuration for spot instances. |
||
| instance_type |
string |
No |
The instance type of the spot instance. |
ecs.c6.large |
| price_limit |
string |
No |
The maximum price per instance. Unit: USD/hour. |
0.39 |
| image_type |
string |
No |
The operating system distribution. Use this parameter to specify the operating system for nodes. Valid values:
|
AliyunLinux3 |
| image_id |
string |
No |
The ID of the custom image. You can call the |
aliyun_3_x64_20G_alibase_20241218.vhd |
| system_disk_category |
string |
No |
The type of the system cloud disk for nodes. Valid values:
Default value: |
cloud_efficiency |
| system_disk_categories |
array |
No |
The types of the system cloud disk. If the system cloud disk cannot be created by using the disk type with the highest priority, the system automatically tries the next disk type in the list. |
|
|
string |
No |
The type of the system cloud disk for nodes. Valid values:
|
cloud_essd |
|
| system_disk_size |
integer |
No |
The size of the system cloud disk for nodes. Unit: GiB. Valid values: 20 to 2048. The value of this parameter must be greater than or equal to the maximum of 20 and the image size. Default value: the maximum of 40 and the size of the image specified by |
120 |
| system_disk_performance_level |
string |
No |
The performance level of the system cloud disk. This parameter takes effect only for ESSDs. The performance level varies based on the disk size. For more information, see ESSDs. Valid values:
|
PL1 |
| system_disk_encrypted |
boolean |
No |
Specifies whether to encrypt the system cloud disk. Valid values:
|
false |
| system_disk_kms_key_id |
string |
No |
The ID of the KMS key used to encrypt the system cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| system_disk_encrypt_algorithm |
string |
No |
The encryption algorithm used for the system cloud disk. Valid value: aes-256. |
aes-256 |
| system_disk_provisioned_iops |
integer |
No |
The provisioned read/write IOPS for the system cloud disk. Valid values: 0 to the minimum of 50,000 and (1,000 × capacity - baseline performance). The baseline performance is the minimum of (1,800 + 50 × capacity) and 50,000. This parameter is supported only when |
1000 |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable performance burst for the system cloud disk. Valid values:
This parameter is supported only when |
true |
| data_disks |
array |
No |
The data cloud disk configuration for nodes. You can add up to 10 data cloud disks. Valid values: 0 to 10. |
|
| data_disk |
No |
The data cloud disk configuration for nodes. |
||
| disk_init |
array |
No |
The block device initialization configuration. |
|
|
DiskInit |
No |
The block device initialization configuration. |
||
| key_pair |
string |
No |
The name of the key pair. You must specify this parameter or |
pro-nodepool |
| login_password |
string |
No |
The SSH logon password. You must specify this parameter or |
Hello1234 |
| internet_charge_type |
string |
No |
The billing method for the public IP address. Valid values:
|
PayByBandwidth |
| internet_max_bandwidth_out |
integer |
No |
The maximum outbound bandwidth for the public IP address. Unit: Mbit/s. Valid values: 1 to 100. |
5 |
| tags |
array |
No |
The tags to be added to ECS instances. A tag key must be unique and can be up to 128 characters in length. Neither the tag key nor the tag value can start with |
|
| tag |
No |
The tag of the ECS instance. |
||
| desired_size |
integer |
No |
The expected number of nodes in the node pool. This is the total number of nodes that the node pool should maintain. Configure at least two nodes to ensure the normal operation of cluster components. You can scale the node pool in or out by adjusting the expected number of nodes. If you do not need to create nodes, set this parameter to 0 and manually increase the number of nodes later. When you scale in the node pool, subscription nodes are not automatically released. Automatic release subscription nodes, change the billing method of the nodes from subscription to pay-as-you-go and then log on to the ECS console automatic release them. |
2 |
| multi_az_policy |
string |
No |
The scaling policy for ECS instances in a multi-zone scaling group. Valid values:
Default value: |
BALANCE |
| scaling_policy |
string |
No |
The scaling mode of the scaling group. Valid values:
|
release |
| on_demand_base_capacity |
integer |
No |
The minimum number of pay-as-you-go instances required in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than this value, the system preferentially creates pay-as-you-go instances. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
No |
The percentage of pay-as-you-go instances among the excess instances after the minimum number of pay-as-you-go instances specified by |
20 |
| spot_instance_pools |
integer |
No |
The number of available instance types. The scaling group evenly creates spot instances based on the most cost-effective instance types. Valid values: 1 to 10. |
5 |
| spot_instance_remedy |
boolean |
No |
Specifies whether to enable spot instance replenishment. After this feature is enabled, when the scaling group receives a system message that a spot instance will be reclaimed, it attempts to create a new instance to replace the spot instance to be reclaimed. Valid values:
|
false |
| compensate_with_on_demand |
boolean |
No |
Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances when the
|
true |
| enable_high_density_mode |
boolean |
No |
Specifies whether to enable the high-density cloud disk mode. This mode is supported only when the node pool uses instance types. After this mode is enabled, the total number of system cloud disks and data cloud disks does not exceed the maximum number of high-density cloud disks supported by the instance type. |
false |
| rds_instances |
array |
No |
The list of ApsaraDB RDS instances. |
|
|
string |
No |
The ApsaraDB RDS instance ID. If an ApsaraDB RDS instance list is specified, the ECS instances of the cluster nodes are automatically added to the access whitelist of the ApsaraDB RDS instance. |
rds-xxx |
|
| private_pool_options |
object |
No |
The private node pool configurations. |
|
| id |
string |
No |
The ID of the private node pool. When |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
No |
The type of the private node pool and the private pool capacity matching mode for instance startup. After the elasticity assurance or capacity reservation service takes effect, private pool capacity is generated for instance startup. Valid values:
|
Open |
platform
deprecated
|
string |
No |
[Deprecated] Use the The operating system platform. Valid values:
|
AliyunLinux |
| instance_patterns |
array |
No |
The instance attribute configurations. |
|
| instance_patterns |
No |
The instance attributes. |
||
| deploymentset_id |
string |
No |
The deployment set to which the ECS instances scaled out by the node pool belong. This parameter takes effect only on new nodes. The deployment sets of existing nodes remain unchanged. |
ds-bp1d19mmbsv3jf6xxxxx |
| security_group_ids |
array |
No |
The list of security group IDs. |
|
|
string |
No |
The security group ID. |
sg-wz9a8g2mt6x5ll****** |
|
| resource_pool_options |
object |
No |
The resource pool and resource pool policy used to create instances. Note the following when you configure this parameter: This parameter takes effect only when you create pay-as-you-go instances. This parameter cannot be configured at the same time as private_pool_options.match_criteria and private_pool_options.id. |
|
| strategy |
string |
No |
The resource pool policy used to create instances. Resource pools include private pools generated after the elasticity assurance or capacity reservation service takes effect, as well as public pools. Valid values:
|
PrivatePoolFirst |
| private_pool_ids |
array |
No |
The list of private pool IDs, which are the IDs of elasticity assurance or capacity reservation services. This parameter only accepts private pool IDs in Target mode. Valid values of N: 1 to 20. |
|
|
string |
No |
The private pool ID, which is the ID of an elasticity assurance or capacity reservation service. This parameter only accepts a private pool ID in Target mode. |
eap-bp67acfmxazb4**** |
|
| system_disk_snapshot_policy_id |
string |
No |
The snapshot policy for the system cloud disk. |
sp-0jl6xnmme8v7o935**** |
| kubernetes_config |
object |
No |
The cluster-related configuration. |
|
| labels |
array |
No |
The node labels. Adds labels to the nodes in the Kubernetes cluster. Label definition rules:
|
|
| tag |
No |
The node label. |
||
| taints |
array |
No |
The taint configuration for the nodes. |
|
| taint |
No |
The taint configuration for the nodes. |
||
| runtime |
string |
No |
The name of the container runtime. ACK supports the following three container runtimes:
Default value: containerd. |
containerd |
| runtime_version |
string |
No |
The container runtime version. |
1.6.38 |
| cpu_policy |
string |
No |
The CPU management policy for the nodes. The following two policies are supported when the cluster version is 1.12.6 or later:
Default value: |
none |
| unschedulable |
boolean |
No |
Specifies whether the nodes are unschedulable after scale-out. Valid values:
|
false |
| user_data |
string |
No |
The instance user data. After a node is added to the cluster, the specified user data script is executed. For more information, see User data scripts. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
| cms_enabled |
boolean |
No |
Specifies whether to install CloudMonitor on ECS nodes. After installation, you can view the monitoring information of the created ECS instances in the CloudMonitor console. Enabling this feature is recommended. Valid values:
Default value: |
true |
| pre_user_data |
string |
No |
The pre-custom instance user data. Before a node is added to the cluster, the specified pre-custom user data script is executed. For more information, see User data scripts. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
| node_name_mode |
string |
No |
The custom node name parameter. A node name consists of three parts: prefix + node IP address + suffix. The prefix and suffix can each consist of one or more parts separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). The node name must start and end with a lowercase letter or a digit. The node IP address is the complete private IP address of the node. The parameter value contains four parts separated by commas. For example, if the parameter is set to the "customized,aliyun,ip,com" string (where "customized" and "ip" are fixed strings, "aliyun" is the prefix, and "com" is the suffix), the node name is aliyun.192.168.xxx.xxx.com. |
customized,aliyun,ip,com |
| tee_config |
object |
No |
The confidential computing cluster configuration. |
|
| tee_enable |
boolean |
No |
Specifies whether to enable the confidential computing cluster. Valid values:
Default value: |
false |
| update_nodes |
boolean |
No |
Synchronously updates the node labels and taints. |
true |
| concurrency |
boolean |
No |
Specifies whether to enable concurrency. |
true |
| eflo_node_group |
object |
No |
The Lingjun node pool configuration. (This parameter does not take effect.) |
|
| auto_attach_enabled |
string |
No |
Specifies whether to enable automatic addition to the Lingjun node pool. (This parameter does not take effect.) |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body data. |
||
| task_id |
string |
The task ID. |
T-5fd211e924e1d00787000293 |
| nodepool_id |
string |
The node pool ID. |
np737c3ac1ac684703b9e10673aa2c**** |
| request_id |
string |
The request ID. |
687C5BAA-D103-4993-884B-C35E4314**** |
Examples
Success response
JSON format
{
"task_id": "T-5fd211e924e1d00787000293",
"nodepool_id": "np737c3ac1ac684703b9e10673aa2c****",
"request_id": "687C5BAA-D103-4993-884B-C35E4314****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.