Modifies 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 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 configuration. |
|
| enable |
boolean |
No |
Specifies whether to enable auto scaling. Valid values:
When this parameter is set to false, other configuration parameters in Default value: |
true |
type
deprecated
|
string |
No |
The auto scaling type, classified by instance type. Valid values:
Default value: |
cpu |
| max_instances |
integer |
No |
The maximum number of instances that can be scaled 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 instances that can be scaled 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 |
[This field is deprecated] This field is deprecated. Use internet_charge_type and internet_max_bandwidth_out instead.
Default value: |
null |
eip_internet_charge_type
deprecated
|
string |
No |
[This field is deprecated] Use internet_charge_type and internet_max_bandwidth_out instead. The EIP billing type. Valid values:
Default value: |
null |
eip_bandwidth
deprecated
|
integer |
No |
[This field is 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:
Default value: |
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
Default value: |
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 |
| auto_vul_fix |
boolean |
No |
Specifies whether to automatically fix CVE vulnerabilities. This parameter takes effect only when
Default value: |
true |
| auto_vul_fix_policy |
object |
No |
The auto CVE fix policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restart. This parameter takes effect only when
Default value: |
true |
| vul_level |
string |
No |
The vulnerability levels allowed for automatic fixing, separated by commas. Example:
Default value: |
asap,nntf |
| exclude_packages |
string |
No |
Specifies the packages to exclude during vulnerability fixing. Default value: |
kernel |
| auto_upgrade |
boolean |
No |
Specifies whether to automatically upgrade nodes. This parameter takes effect only when
Default value: |
true |
| auto_upgrade_policy |
object |
No |
The auto upgrade policy. |
|
| auto_upgrade_kubelet |
boolean |
No |
Specifies whether to allow automatic kubelet upgrade. This parameter takes effect only when
Default value: |
true |
| auto_upgrade_runtime |
boolean |
No |
Specifies whether to allow automatic runtime upgrade. This parameter takes effect only when
Default value: |
false |
| auto_upgrade_os |
boolean |
No |
Specifies whether to allow automatic operating system upgrade. This parameter takes effect only when
Default value: |
false |
upgrade_config
deprecated
|
object |
No |
[This field is deprecated] Use the The auto upgrade configuration. This parameter takes effect only when |
|
auto_upgrade
deprecated
|
boolean |
No |
[This field is deprecated] Use the Specifies whether to enable auto upgrade:
Default value: |
true |
| surge |
integer |
No |
The number of extra nodes. This parameter is mutually exclusive with Nodes become unavailable during upgrades. You can create extra nodes to compensate for the cluster workload. Note
The number of extra nodes should not exceed the current number of nodes. |
5 |
| surge_percentage |
integer |
No |
The percentage of extra nodes. This parameter is mutually exclusive with Number of extra nodes = percentage of extra nodes × number of nodes. For example, if the percentage is set to 50% and there are 6 existing nodes, the number of extra nodes = 50% × 6 = 3. |
0 |
| max_unavailable |
integer |
No |
The maximum number of unavailable nodes. Valid values: [1,1000]. Default value: 1. |
1 |
| auto_fault_diagnosis |
boolean |
No |
Specifies whether to enable ECS fault detection for node self-healing. |
|
| drift_enabled |
boolean |
No |
||
| scaling_group |
object |
No |
The scaling group configuration of the node pool. |
|
| vswitch_ids |
array |
No |
The list of vSwitch IDs. Valid values: [1,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 select multiple instance types as alternatives. When each node is created, the system attempts to purchase instances starting from the first specification until the creation succeeds. The actual purchased instance type may vary depending on inventory availability. Supported number of instance types: [1,10]. |
|
|
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:
Default value: |
PostPaid |
| period |
integer |
No |
The subscription duration of nodes in the node pool. This parameter takes effect and is required 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
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. Valid values:
Default value: 1. |
1 |
| spot_strategy |
string |
No |
The spot instance type. Valid values:
For more information, see Spot instances. |
SpotWithPriceLimit |
| spot_price_limit |
array<object> |
No |
The price limit configuration for spot instances. |
|
|
object |
No |
The price limit configuration for spot instances. |
||
| instance_type |
string |
No |
The spot instance type. |
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 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 node system cloud disk. Valid values:
Default value: |
cloud_efficiency |
| system_disk_categories |
array |
No |
Multiple system cloud disk types. When a higher-priority cloud disk type 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 nodes. Valid values:
|
cloud_essd |
|
| system_disk_size |
integer |
No |
The size of the node system cloud disk. Unit: GiB. Valid values: [20,2048]. The value must be greater than or equal to max{20, ImageSize}. Default value: max{40, image size corresponding to the ImageId parameter}. |
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 ESSDs.
|
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. Valid values: 0~min{50,000, 1000*capacity-baseline performance}. Baseline performance=min{1,800+50*capacity, 50000}. This parameter is supported only when |
1000 |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable burst (performance burst) for the node system cloud disk. Valid values:
This parameter is supported only when |
true |
| data_disks |
array |
No |
The data cloud disk configuration for nodes. Valid values: [0,10]. You can add up to 10 data cloud disks. |
|
| data_disk |
No |
The node data cloud disk configuration. |
||
| disk_init |
array |
No |
The block device initialization configuration. |
|
|
DiskInit |
No |
The block device initialization configuration. |
||
| key_pair |
string |
No |
The key pair name. This parameter is mutually exclusive with |
pro-nodepool |
| login_password |
string |
No |
The SSH logon password. This parameter is mutually exclusive with |
Hello1234 |
| internet_charge_type |
string |
No |
The billing type for public IP addresses. Valid values:
|
PayByBandwidth |
| internet_max_bandwidth_out |
integer |
No |
The maximum outbound bandwidth for the node public IP address. Unit: Mbit/s. Valid values: [1,100]. |
5 |
| tags |
array |
No |
Tags added only to ECS instances. Tag keys cannot be duplicated and can be up to 128 characters in length. Tag keys and tag values cannot start with "aliyun" or "acs:", or contain "https://" or "http://". |
|
| tag |
No |
The ECS instance tag. |
||
| desired_size |
integer |
No |
The desired number of nodes in the node pool. The total number of nodes that the node pool should maintain. We recommend that you configure at least 2 nodes to ensure that cluster components run properly. You can scale the node pool in or out by adjusting the desired node count. If you do not need to create nodes, set this parameter to 0 and manually adjust the value later to add nodes. |
2 |
| multi_az_policy |
string |
No |
The multi-zone scaling policy for ECS instances in the scaling group. Valid values:
Default value: |
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]. When the number of pay-as-you-go instances is less than this value, pay-as-you-go instances are created first. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
No |
The percentage of pay-as-you-go instances among instances that exceed the minimum pay-as-you-go instance count ( |
20 |
| spot_instance_pools |
integer |
No |
The number of available instance types. The scaling group creates spot instances of multiple lowest-cost instance types in a balanced manner. Valid values: [1,10]. |
5 |
| spot_instance_remedy |
boolean |
No |
Specifies whether to enable supplementing spot instances. If enabled, when the system notifies that a spot instance will be reclaimed, the scaling group attempts to create a new instance to replace the spot instance that will be reclaimed. Valid values:
|
false |
| compensate_with_on_demand |
boolean |
No |
When
|
true |
| rds_instances |
array |
No |
The list of ApsaraDB RDS instances. |
|
|
string |
No |
The ApsaraDB RDS instance ID. If an RDS instance list is specified, the ECS instances of 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 private node pool type and private pool capacity option for instance startup. After an elasticity assurance or capacity reservation takes effect, a private pool is generated for instance startup. Valid values:
|
Open |
platform
deprecated
|
string |
No |
This field is deprecated. Use the The operating system platform. Valid values:
|
AliyunLinux |
| instance_patterns |
array |
No |
The instance attribute configuration. |
|
| 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 pool and resource pool strategy used when creating instances. Note the following when you set this parameter: This parameter takes effect only when creating pay-as-you-go instances. This parameter cannot be set together with private_pool_options.match_criteria or private_pool_options.id. |
|
| strategy |
string |
No |
The resource pool strategy used when creating instances. Resource pools include private pools generated after an elasticity assurance or capacity reservation takes effect, and public pools for instance startup. Valid values: PrivatePoolFirst: private pool first. When this strategy is selected, if resouce_pool_options.private_pool_ids is specified, the specified private pools are used first. If no private pool is specified or the specified private pool capacity is insufficient, open-type private pools are automatically matched. If no matching private pool is available, public pool resources are used to create instances. PrivatePoolOnly: private pool only. When this strategy is selected, you must specify resouce_pool_options.private_pool_ids. If the specified private pool capacity is insufficient, the instance fails to start. None: do not use a resource pool strategy. 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 added to Kubernetes cluster nodes. 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 node CPU management policy. The following two policies are supported for cluster versions 1.12.6 and later:
Default value: |
none |
| unschedulable |
boolean |
No |
Specifies whether the nodes added after scale-out are unschedulable. Valid values:
|
false |
| user_data |
string |
No |
The instance user data. After the 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-instance user data. Before the 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 + suffix. Both the prefix and suffix can consist of one or more parts separated by ".". Each part can contain lowercase letters, digits, and hyphens (-). The node name must start and end with a lowercase letter or digit. The node IP is the full private IP address of the node. The parameter contains four parts separated by commas. For example, if you pass in the string "customized,aliyun,ip,com" (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 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.