Updates the configuration of a node pool based on the node pool ID by calling the ModifyClusterNodePool operation.
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 configuration. |
|
| 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 scaled out by the node pool belong to this resource group. |
rg-acfmyvw3wjm**** |
| auto_scaling |
object |
No |
The auto scaling configuration. |
|
| enable |
boolean |
No |
Specifies whether to enable auto scaling. Valid values: |
true |
type
deprecated
|
string |
No |
The auto scaling type, classified by instance type. Valid values: |
cpu |
| max_instances |
integer |
No |
The maximum number of instances that can be scaled out in the node pool, excluding your existing instances. This parameter takes effect only when |
10 |
| min_instances |
integer |
No |
The minimum number of scalable instances in the node pool, excluding your 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] This parameter is deprecated. Use internet_charge_type and internet_max_bandwidth_out instead. |
null |
eip_internet_charge_type
deprecated
|
string |
No |
[Deprecated] Use internet_charge_type and internet_max_bandwidth_out instead. |
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,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
Default value: |
true |
| auto_repair_policy |
object |
No |
The auto repair node policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restart. This parameter takes effect only when |
true |
| approval_required |
boolean |
No |
Specifies whether node repair requires manual approval. |
|
| auto_repair_policy_id |
string |
No |
The auto repair policy ID. |
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 range: 1 to 100000) or a percentage (such as 10%, valid range: 1% to 100%). Default value: 1. |
5 |
| max_unhealthy_nodes_threshold |
string |
No |
The circuit breaker condition for self-healing. When the number or percentage of faulty nodes exceeds this threshold, self-healing enters a circuit breaker state and stops initiating new repair actions. You can specify a number (such as 10, valid range: 1 to 100000) or a percentage (such as 20%, valid range: 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 |
true |
| auto_vul_fix_policy |
object |
No |
The auto CVE fix policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restarts. This parameter takes effect only when
Default value: |
true |
| vul_level |
string |
No |
The vulnerability levels that are allowed for auto fix, separated by commas. Example: |
asap,nntf |
| exclude_packages |
string |
No |
Specifies the packages to exclude during vulnerability fix. |
kernel |
| auto_upgrade |
boolean |
No |
Specifies whether to automatically upgrade nodes. This parameter takes effect only when |
true |
| auto_upgrade_policy |
object |
No |
The auto upgrade policy. |
|
| auto_upgrade_kubelet |
boolean |
No |
Specifies whether to allow auto upgrade of kubelet. This parameter takes effect only when |
true |
| auto_upgrade_runtime |
boolean |
No |
Specifies whether to allow auto upgrade of the runtime. This parameter takes effect only when |
false |
| auto_upgrade_os |
boolean |
No |
Specifies whether to allow auto upgrade of the operating system. This parameter takes effect only when |
false |
upgrade_config
deprecated
|
object |
No |
[Deprecated] Use the The automatic upgrade configuration. This parameter takes effect only when |
|
auto_upgrade
deprecated
|
boolean |
No |
[Deprecated] Use the |
true |
| surge |
integer |
No |
The number of extra nodes. You can specify either this parameter or |
5 |
| surge_percentage |
integer |
No |
The percentage of extra nodes. You can specify either this parameter or |
0 |
| max_unavailable |
integer |
No |
The maximum number of unavailable nodes. |
1 |
| auto_fault_diagnosis |
boolean |
No |
Specifies whether to enable ECS fault detection for node self-healing. |
|
| drift_enabled |
boolean |
No |
Specifies whether to enable node rotation. Only intelligent managed node pools support this feature, and it is enabled by default. Common node pools do not support this feature. |
|
| scaling_group |
object |
No |
The scaling group configuration of the node pool. |
|
| vswitch_ids |
array |
No |
The list of vSwitch IDs. Valid values: 1 to 8. Note
To ensure high availability, select vSwitches in different zones. |
|
|
string |
No |
The vSwitch ID. |
vsw-wz9uwxhawmtzg7u9h**** |
|
| instance_types |
array |
No |
The list of node instance types. You can specify multiple instance types as alternatives. During node creation, the system attempts to purchase instances starting from the first specification until the creation succeeds. The final purchased instance type may vary depending on inventory availability. |
|
|
string |
No |
The instance type. For more information, see Instance families. |
ecs.c6.large |
|
| instance_charge_type |
string |
No |
The billing method of nodes in the node pool. Valid values: |
PostPaid |
| period |
integer |
No |
The subscription duration of nodes in the node pool. This parameter takes effect only when
|
1 |
| period_unit |
string |
No |
The billing cycle of nodes in the node pool. This parameter takes effect and is required only when |
Month |
| auto_renew |
boolean |
No |
Specifies whether to enable auto-renewal for nodes. This parameter takes effect only when |
true |
| auto_renew_period |
integer |
No |
The duration of a single auto-renewal cycle. Valid values: |
1 |
| spot_strategy |
string |
No |
The type of spot instance. Valid values: |
SpotWithPriceLimit |
| spot_price_limit |
array<object> |
No |
The price limit configurations for spot instances. |
|
|
object |
No |
The price limit configurations for spot instances. |
||
| instance_type |
string |
No |
The instance type of the spot instance. |
ecs.c6.large |
| price_limit |
string |
No |
The maximum price of a single instance. Unit: USD/hour. |
0.39 |
| image_type |
string |
No |
The operating system distribution type. We recommend that you use this field to specify the node operating system. Valid values:
|
AliyunLinux3 |
| image_id |
string |
No |
The custom image ID. You can call |
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 multiple cloud disk types for the system cloud disk. If a cloud disk type with a higher priority is unavailable, the system automatically attempts the next priority cloud disk type to create the system cloud disk. |
|
|
string |
No |
The multiple system cloud disk types for the node. |
cloud_essd |
|
| system_disk_size |
integer |
No |
The size of the node system cloud disk. Unit: GiB. |
120 |
| system_disk_performance_level |
string |
No |
The performance level of the node system cloud disk. This parameter takes effect only for ESSD cloud disks. The performance level is related to the cloud disk size. For more information, see ESSD cloud disks. |
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 KMS key ID used by the system cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| system_disk_encrypt_algorithm |
string |
No |
The encryption algorithm used by the system cloud disk. Valid values: aes-256. |
aes-256 |
| system_disk_provisioned_iops |
integer |
No |
The provisioned read/write IOPS for the node system cloud disk. |
1000 |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable burst (I/O performance burst) for the node system cloud disk. Valid values: |
true |
| data_disks |
array |
No |
The data cloud disk configurations for nodes. Valid values: 0 to 10. You can add up to 10 data cloud disks. |
|
| 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 key pair name. Specify either this parameter or |
pro-nodepool |
| login_password |
string |
No |
The SSH logon password. Specify either this parameter or |
Hello1234 |
| internet_charge_type |
string |
No |
The billing method for public IP addresses. Valid values: |
PayByBandwidth |
| internet_max_bandwidth_out |
integer |
No |
The maximum outbound bandwidth for the node public IP address. Unit: Mbps (Mega bit per second). Valid values: [1,100]. |
5 |
| tags |
array |
No |
Adds tags only to ECS instances. |
|
| tag |
No |
The ECS instance tag. |
||
| desired_size |
integer |
No |
The desired number of nodes in the node pool. |
2 |
| multi_az_policy |
string |
No |
The multi-zone scaling policy for ECS instances in the scaling group. Valid values: |
BALANCE |
| scaling_policy |
string |
No |
The scaling group mode. Valid values: |
release |
| on_demand_base_capacity |
integer |
No |
The minimum number of pay-as-you-go instances required by the scaling group. Valid values: [0,1000]. Pay-as-you-go instances are created with priority when the number of pay-as-you-go instances is less than this value. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
No |
The percentage of pay-as-you-go instances among the instances that exceed the minimum number of pay-as-you-go instances ( |
20 |
| spot_instance_pools |
integer |
No |
The number of available instance types. The scaling group creates spot instances in a cost-optimized manner across multiple instance types. Valid values: [1,10]. |
5 |
| spot_instance_remedy |
boolean |
No |
Specifies whether to enable spot instance supplementation. If 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 that is about to be reclaimed. Valid values: |
false |
| compensate_with_on_demand |
boolean |
No |
Specifies whether to allow the automatic creation of pay-as-you-go instances to meet the required number of ECS instances when spot instances cannot be created due to cost or inventory reasons, if
|
true |
| enable_high_density_mode |
boolean |
No |
Specifies whether to enable high-density cloud disk mode. This is supported only when the node pool uses instance types. When enabled, the total number of system cloud disks and data cloud disks does not exceed the high-density cloud disk count supported by the instance type. |
false |
| rds_instances |
array |
No |
The list of RDS instances. |
|
|
string |
No |
The RDS instance ID. If you specify the RDS instance list, the ECS instances in the cluster nodes are automatically added to the RDS whitelist. |
rds-xxx |
|
| private_pool_options |
object |
No |
The private node pool configuration. |
|
| id |
string |
No |
The private node pool ID. When |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
No |
The type of the private node pool. The private pool option for instance startup. After an elasticity assurance or capacity reservation takes effect, a private pool is generated for instances to use during 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 created by the node pool belong. This setting takes effect only on new nodes. The deployment set of existing nodes is not changed. |
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 pools and resource pool policies used when creating instances. After you set this parameter, note the following: |
|
| strategy |
string |
No |
The resource pool strategy used when instances are created. Resource pools include private pools generated after elasticity assurance or capacity reservation takes effect, and public pools, which are available for instance startup. Valid values:
Default value: None. |
PrivatePoolFirst |
| private_pool_ids |
array |
No |
The list of private pool IDs, which are elasticity assurance IDs or capacity reservation IDs. Only Target mode private pool IDs can be specified. Valid values of N: 1 to 20. |
|
|
string |
No |
The private pool ID, which is the elasticity assurance ID or capacity reservation ID. Only Target mode private pool IDs can be specified. |
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. You can add labels to the nodes in the Kubernetes cluster. Label definition rules: |
|
| tag |
No |
The node label. |
||
| taints |
array |
No |
The node taint configuration. |
|
| taint |
No |
The node taint configuration. |
||
| runtime |
string |
No |
The container runtime name. 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 nodes. The following two policies are supported for clusters of version 1.12.6 or later: |
none |
| unschedulable |
boolean |
No |
Specifies whether the nodes added during the scale-out are unschedulable. |
false |
| user_data |
string |
No |
The instance user data. After a node joins the cluster, the specified user data script is run. For more information, see User data scripts. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
| cms_enabled |
boolean |
No |
Specifies whether to install the CloudMonitor agent on ECS nodes. After installation, you can view monitoring information of the created ECS instances in the CloudMonitor console. We recommend that you enable this feature. Valid values:
Default value: |
true |
| pre_user_data |
string |
No |
The pre-user data of the instance. Before a node joins the cluster, the specified pre-user data script is run. 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. |
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 |
Specifies whether to synchronously update node labels and taints. |
true |
| concurrency |
boolean |
No |
Specifies whether to enable concurrency. |
true |
| eflo_node_group |
object |
No |
The Lingjun node pool configuration. (Not effective) |
|
| auto_attach_enabled |
string |
No |
Specifies whether to enable automatic addition for the Lingjun node pool. (Not effective) |
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.