ModifyClusterNodePool
The ModifyClusterNodePool operation updates the configuration of a node pool.
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. |
|
| nodepool_info |
object |
No |
The node pool configurations. |
|
| name |
string |
No |
The name of the node pool. The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-). |
default-nodepool |
| resource_group_id |
string |
No |
The ID of the resource group. Instances created in 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 as needed. |
rg-acfmyvw3wjm**** |
| auto_scaling |
object |
No |
The auto scaling configurations. |
|
| enable |
boolean |
No |
Specifies whether to enable auto scaling. Valid values:
If you set this parameter to false, other parameters in Default value: |
true |
type
deprecated
|
string |
No |
The type of auto scaling. This parameter specifies the type of instances to be scaled. Valid values:
Default value: |
cpu |
| max_instances |
integer |
No |
The maximum number of instances that can be created in the node pool. This parameter does not include existing instances. This parameter takes effect only when The value must be in the range of [min_instances, 2000]. The default value is 0. |
10 |
| min_instances |
integer |
No |
The minimum number of instances that can be created in the node pool. This parameter does not include existing instances. This parameter takes effect only when The value must be in the range of [0, max_instances]. The default value is 0. Note
|
2 |
is_bond_eip
deprecated
|
boolean |
No |
[This parameter is deprecated] This parameter is deprecated. Use internet_charge_type and internet_max_bandwidth_out instead.
Default value: |
null |
eip_internet_charge_type
deprecated
|
string |
No |
[This parameter is 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 |
[This parameter is deprecated] Use internet_charge_type and internet_max_bandwidth_out instead. The peak bandwidth of the EIP. Value range: [1,100]. Unit: Mbit/s. |
null |
| management |
object |
No |
The configurations of the managed node pool. |
|
| enable |
boolean |
No |
Specifies whether to enable the managed node pool feature. Valid values:
Default value: |
true |
| auto_repair |
boolean |
No |
Specifies whether to enable auto node repair. This parameter takes effect only when
Default value: |
true |
| auto_repair_policy |
object |
No |
The auto node repair 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 manual approval is required for node repair. |
|
| auto_repair_policy_id |
string |
No |
The ID of the auto repair policy. |
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 policy for automatically fixing CVE vulnerabilities. |
|
| 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 that are allowed to be automatically fixed. The levels are separated by commas (,). For example:
Default value: |
asap,nntf |
| exclude_packages |
string |
No |
Specifies the packages that should be excluded during vulnerability fixing. Default value: |
kernel |
| auto_upgrade |
boolean |
No |
Specifies whether to enable auto node upgrade. 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 auto kubelet upgrade. This parameter takes effect only when
Default value: |
true |
| auto_upgrade_runtime |
boolean |
No |
Specifies whether to allow auto runtime upgrade. This parameter takes effect only when
Default value: |
false |
| auto_upgrade_os |
boolean |
No |
Specifies whether to allow auto operating system upgrade. This parameter takes effect only when
Default value: |
false |
upgrade_config
deprecated
|
object |
No |
[This parameter is deprecated] Use the The auto upgrade configurations. This parameter takes effect only when |
|
auto_upgrade
deprecated
|
boolean |
No |
[This parameter is deprecated] Use the Specifies whether to enable auto upgrade:
Default value: |
true |
| surge |
integer |
No |
The number of extra nodes. You can specify only one of surge and Nodes may become unavailable during an upgrade. You can create extra nodes to compensate for the workload. Note
The number of extra nodes cannot exceed the total number of nodes in the node pool. |
5 |
| surge_percentage |
integer |
No |
The percentage of extra nodes. You can specify only one of surge and Number of extra nodes = Percentage of extra nodes × Number of nodes. For example, if you set the percentage of extra nodes to 50% and the number of existing nodes is 6, the number of extra nodes is 50% × 6 = 3. |
0 |
| max_unavailable |
integer |
No |
The maximum number of unavailable nodes. Value range: [1,1000] Default value: 1. |
1 |
| auto_fault_diagnosis |
boolean |
No |
||
| scaling_group |
object |
No |
The configurations of the scaling group for the node pool. |
|
| vswitch_ids |
array |
No |
A list of vSwitch IDs. The value can be a list of 1 to 8 vSwitch IDs. Note
For high availability, we recommend that you select vSwitches in different zones. |
|
|
string |
No |
The vSwitch ID. |
vsw-wz9uwxhawmtzg7u9h**** |
|
| instance_types |
array |
No |
A list of node instance types. You can select multiple instance types as alternatives. When a node is created, the system starts from the first instance type until the node is created. The instance type that is used to create the node varies based on the inventory. The number of supported instance types ranges from 1 to 10. |
|
|
string |
No |
The instance type. For more information, see Instance families. |
ecs.c6.large |
|
| instance_charge_type |
string |
No |
The billing method of the nodes in the node pool. Valid values:
Default value: |
PostPaid |
| period |
integer |
No |
The subscription duration of the nodes in the node pool. This parameter takes effect and is required only when
|
1 |
| period_unit |
string |
No |
The billing cycle of the nodes in the node pool. This parameter is required if
Default value: |
Month |
| auto_renew |
boolean |
No |
Specifies whether to enable auto-renewal for the 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 bidding policy for spot instances. Valid values:
For more information, see Spot instances. |
SpotWithPriceLimit |
| spot_price_limit |
array<object> |
No |
The price range of the spot instance. |
|
|
object |
No |
The price range of the spot instance. |
||
| 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: CNY/hour. |
0.39 |
| image_type |
string |
No |
The OS distribution. We recommend that you use this parameter to specify the node OS. 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 disk. Valid values:
Default value: |
cloud_efficiency |
| system_disk_categories |
array |
No |
The multi-disk type of the system disk. When a disk of a higher priority type is not available, the system automatically tries the next priority type to create the system disk. |
|
|
string |
No |
The multi-disk type of the node system. Valid values:
|
cloud_essd |
|
| system_disk_size |
integer |
No |
The size of the system disk. Unit: GiB. Value range: [20,2048]. The value of this parameter must be greater than or equal to max{20, ImageSize}. Default value: max{40, ImageSize of the image specified by the ImageId parameter}. |
120 |
| system_disk_performance_level |
string |
No |
The performance level of the system disk. This parameter is valid only for ESSDs. The disk performance level is related to the disk size. For more information, see ESSDs.
|
PL1 |
| system_disk_encrypted |
boolean |
No |
Specifies whether to encrypt the system disk. Valid values:
|
false |
| system_disk_kms_key_id |
string |
No |
The ID of the KMS key that is used to encrypt the system disk. |
0e478b7a-4262-4802-b8cb-00d3fb40**** |
| system_disk_encrypt_algorithm |
string |
No |
The encryption algorithm that is used for the system disk. Valid value: aes-256. |
aes-256 |
| system_disk_provisioned_iops |
integer |
No |
The pre-configured read and write IOPS of the system disk. Valid values: 0 to min{50,000, 1000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50000}. This parameter can be set only when |
1000 |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable the performance burst feature for the system disk. Valid values:
This parameter can be set only when |
true |
| data_disks |
array |
No |
The configurations of the data disks on the nodes. You can add up to 10 data disks. The value must be in the range of [0, 10]. |
|
| data_disk |
No |
The configurations of the data disk. |
||
| 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 set key_pair or |
pro-nodepool |
| login_password |
string |
No |
The SSH logon password. You must set key_pair or |
Hello1234 |
| internet_charge_type |
string |
No |
The billing method of the public IP address. Valid values:
|
PayByBandwidth |
| internet_max_bandwidth_out |
integer |
No |
The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Value range: [1,100]. |
5 |
| tags |
array |
No |
The tags that you want to add only to ECS instances. A tag key cannot be repeated. The tag key can be up to 128 characters in length. The tag key and the tag value cannot start with “aliyun” or “acs:”, or contain “https://” or “http://”. |
|
| tag |
No |
The tag of the ECS instance. |
||
| desired_size |
integer |
No |
The expected 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 two nodes to ensure that the cluster components run as normal. You can scale out or scale in the node pool by adjusting the expected number of nodes. If you do not want to create nodes, set this parameter to 0. You can manually adjust the number of nodes later. |
2 |
| multi_az_policy |
string |
No |
The scaling policy for the ECS instances in the 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 on-demand instances that must be provisioned in the scaling group. Value range: [0,1000]. When the number of on-demand instances is less than this value, the system preferentially creates on-demand instances. |
0 |
| on_demand_percentage_above_base_capacity |
integer |
No |
The percentage of on-demand instances among the instances that exceed the minimum number of on-demand instances ( |
20 |
| spot_instance_pools |
integer |
No |
The number of available instance types. The scaling group creates spot instances of multiple instance types that are available at the lowest cost. Value range: [1,10]. |
5 |
| spot_instance_remedy |
boolean |
No |
Specifies whether to enable the instance replacement feature for spot instances. If this feature is enabled, the scaling group creates a new instance to replace a spot instance when the scaling group receives a system message that the spot instance is to be reclaimed. Valid values:
|
false |
| compensate_with_on_demand |
boolean |
No |
If
|
true |
| rds_instances |
array |
No |
A list of RDS instances. |
|
|
string |
No |
The ID of the RDS instance. If you specify a list of RDS instances, the ECS instances in the cluster are automatically added to the whitelist of the RDS instances. |
rds-xxx |
|
| private_pool_options |
object |
No |
The configurations of the private node pool. |
|
| id |
string |
No |
The ID of the private node pool. If |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
No |
The type of the private node pool. This parameter specifies the private pool capacity option for instance creation. The capacity of a private pool is generated after an elasticity assurance or a capacity reservation service takes effect. You can select a capacity option when you create an instance. Valid values:
|
Open |
platform
deprecated
|
string |
No |
[This parameter is deprecated] Use the The OS platform. Valid values:
|
AliyunLinux |
| instance_patterns |
array |
No |
The instance attribute configuration. |
|
| instance_patterns |
No |
The instance attributes. |
||
| deploymentset_id |
string |
No |
The ID of the deployment set to which the ECS instances in the node pool belong. This parameter takes effect only for incremental nodes. The deployment sets of existing nodes are not changed. |
ds-bp1d19mmbsv3jf6xxxxx |
| security_group_ids |
array |
No |
A 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 that are used when you create an instance. Note: This parameter is valid only when you create a pay-as-you-go instance. This parameter cannot be specified at the same time as private_pool_options.match_criteria and private_pool_options.id. |
|
| strategy |
string |
No |
The resource pool policy that is used when you create an instance. A resource pool includes a private pool that is generated after an elasticity assurance or a capacity reservation service takes effect and a public pool. You can select a resource pool when you create an instance. Valid values: PrivatePoolFirst: The private pool is used first. If you specify resouce_pool_options.private_pool_ids, the specified private pool is used first. If you do not specify a private pool or the capacity of the specified private pool is insufficient, the capacity of open private pools is automatically matched. If no matching private pool is found, the resources in the public pool are used to create the instance. PrivatePoolOnly: Only the private pool is used. If you select this option, you must specify resouce_pool_options.private_pool_ids. If the capacity of the specified private pool is insufficient, the instance fails to be created. None: No resource pool policy is used. Default value: None. |
PrivatePoolFirst |
| private_pool_ids |
array |
No |
A list of private pool IDs. The IDs can be the IDs of elasticity assurances or capacity reservations. You can specify only the IDs of private pools in Target mode. N can be an integer from 1 to 20. |
|
|
string |
No |
The ID of the private pool. The ID can be the ID of an elasticity assurance or a capacity reservation. You can specify only the ID of a private pool in Target mode. |
eap-bp67acfmxazb4**** |
|
| system_disk_snapshot_policy_id |
string |
No |
The snapshot policy for the system disk. |
sp-0jl6xnmme8v7o935**** |
| kubernetes_config |
object |
No |
The Kubernetes configurations. |
|
| labels |
array |
No |
The labels that you want to add to the nodes. The labels must be key-value pairs. Rules:
|
|
| tag |
No |
The node label. |
||
| taints |
array |
No |
The node taint configurations. |
|
| taint |
No |
The node taint configuration. |
||
| runtime |
string |
No |
The name of the container runtime. ACK supports the following container runtimes.
Default value: containerd. |
containerd |
| runtime_version |
string |
No |
The version of the container runtime. |
1.6.38 |
| cpu_policy |
string |
No |
The CPU management policy of the node. The following policies are supported for clusters that run Kubernetes 1.12.6 or later:
Default value: |
none |
| unschedulable |
boolean |
No |
Specifies whether the scaled-out nodes are unschedulable.
|
false |
| user_data |
string |
No |
The instance user data. After a node is added to the cluster, the specified instance user data script is run. For more information, see User data scripts. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
| cms_enabled |
boolean |
No |
Specifies whether to install Cloud Monitor on the ECS nodes. After Cloud Monitor is installed, you can view monitoring information about the created ECS instances in the Cloud Monitor console. We recommend that you enable this feature. Valid values:
Default value: |
true |
| pre_user_data |
string |
No |
The pre-custom data of the instance. Before a node is added to the cluster, the specified instance pre-custom data script is run. For more information, see User data scripts. |
IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
| node_name_mode |
string |
No |
The parameter for customizing the node name. A node name consists of three parts: a prefix, the node IP address, and a suffix. The prefix and suffix can each contain 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 consists of four parts separated by commas (,). For example, if you pass 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 configurations of the Kubernetes cluster for confidential computing. |
|
| tee_enable |
boolean |
No |
Specifies whether to enable the Kubernetes cluster for confidential computing. Valid values:
Default value: |
false |
| update_nodes |
boolean |
No |
Synchronously updates the labels and taints of nodes. |
true |
| concurrency |
boolean |
No |
Specifies whether to run the task concurrently. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| 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.