ModifyClusterNodePool
You can call the ModifyClusterNodePool operation to update 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 to which the node pool belongs. The instances that are 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 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 this parameter is set to false, other parameters in auto_scaling do not take effect. Default value: |
true |
type
deprecated
|
string |
No |
The type of auto scaling. The scaling is performed based on the instance type. Valid values:
Default value: |
cpu |
| max_instances |
integer |
No |
The maximum number of instances that can be created in the node pool. This value does not include existing instances. This parameter takes effect only when enable is set to true. Value range: [min_instances, 2000]. Default value: 0. |
10 |
| min_instances |
integer |
No |
The minimum number of instances that can be created in the node pool. This value does not include existing instances. This parameter takes effect only when enable is set to true. Value range: [0, max_instances]. Default value: 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 enable is set to true.
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 auto_repair is set to true. Valid values:
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 enable auto CVE vulnerability fixing. This parameter takes effect only when enable is set to true.
Default value: |
true |
| auto_vul_fix_policy |
object |
No |
The auto CVE vulnerability fixing policy. |
|
| restart_node |
boolean |
No |
Specifies whether to allow node restart. This parameter takes effect only when auto_vul_fix is set to true. Valid values:
Default value: |
true |
| vul_level |
string |
No |
The CVE vulnerability levels that are allowed to be automatically fixed. Separate multiple levels with commas (,). Example:
Default value: |
asap,nntf |
| exclude_packages |
string |
No |
The packages that should be excluded during CVE vulnerability fixing. Default value: |
kernel |
| auto_upgrade |
boolean |
No |
Specifies whether to enable auto node upgrade. This parameter takes effect only when enable is set to true.
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 auto_upgrade is set to true. Valid values:
Default value: |
true |
| auto_upgrade_runtime |
boolean |
No |
Specifies whether to allow auto runtime upgrade. This parameter takes effect only when auto_upgrade is set to true. Valid values:
Default value: |
false |
| auto_upgrade_os |
boolean |
No |
Specifies whether to allow auto OS upgrade. This parameter takes effect only when auto_upgrade is set to true. Valid values:
Default value: |
false |
upgrade_config
deprecated
|
object |
No |
[This parameter is deprecated] Use the The auto upgrade configurations. This parameter takes effect only when enable is set to true. |
|
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 surge_percentage. Nodes may become unavailable during an upgrade. You can create extra nodes to ensure service continuity. 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 surge_percentage. 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 nodes is 6, the number of extra nodes is 3 (50% × 6). |
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. 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 |
A list of instance types. You can specify multiple instance types as alternatives. When a node is created, the system attempts to purchase the instance types in the order they are specified until the node is created. The instance type that is purchased may vary based on the inventory. You can specify 1 to 10 instance types. |
|
|
string |
No |
The instance type. For more information, see Instance family. |
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 instance_charge_type is set to PrePaid.
|
1 |
| period_unit |
string |
No |
The billing cycle of the nodes in the node pool. This parameter is required if instance_charge_type is set to PrePaid.
Default value: |
Month |
| auto_renew |
boolean |
No |
Specifies whether to enable auto-renewal for the nodes. This parameter takes effect only when instance_charge_type is set to PrePaid. Valid values:
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 the spot instance. Valid values:
For more information, see Spot instances. |
SpotWithPriceLimit |
| spot_price_limit |
array<object> |
No |
The configurations of the price range for the spot instance. |
|
|
object |
No |
The configurations of the price range for 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: USD/hour. |
0.39 |
| image_type |
string |
No |
The distribution of the OS. We recommend that you use this parameter to specify the OS of the node. Valid values:
|
AliyunLinux3 |
| image_id |
string |
No |
The ID of the custom image. You can call the DescribeKubernetesVersionMetadata operation to query the images that are supported by the system. By default, the latest system image is used. |
aliyun_3_x64_20G_alibase_20241218.vhd |
| system_disk_category |
string |
No |
The type of the system disk of the node. Valid values:
Default value: |
cloud_efficiency |
| system_disk_categories |
array |
No |
The multi-disk type of the system disk. When a disk of a high-priority disk type is unavailable, the system automatically tries the next-priority disk type to create the system disk. |
|
|
string |
No |
The multi-system disk type of the node. Valid values:
|
cloud_essd |
|
| system_disk_size |
integer |
No |
The size of the system disk of the node. 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, size of the image that corresponds to the ImageId parameter}. |
120 |
| system_disk_performance_level |
string |
No |
The performance level of the system disk of the node. This parameter takes effect only for ESSDs. The performance level of the disk 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 to encrypt the system disk. Valid value: aes-256. |
aes-256 |
| system_disk_provisioned_iops |
integer |
No |
The provisioned read/write IOPS of the system disk of the node. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. You can set this parameter only when system_disk_category is set to cloud_auto. For more information, see ESSD AutoPL disks. |
1000 |
| system_disk_bursting_enabled |
boolean |
No |
Specifies whether to enable the performance burst feature for the system disk of the node. Valid values:
You can set this parameter only when system_disk_category is set to cloud_auto. For more information, see ESSD AutoPL disks. |
true |
| data_disks |
array |
No |
The configurations of the data disks of the node. You can specify 0 to 10 data disks. |
|
| data_disk |
No |
The configurations of the data disk of the node. |
||
| disk_init |
array |
No |
The configurations for block device initialization. |
|
|
DiskInit |
No |
The configurations for block device initialization. |
||
| key_pair |
string |
No |
The name of the key pair. You must set one of key_pair and login_password. If the node pool is a managed node pool, you can only set key_pair. |
pro-nodepool |
| login_password |
string |
No |
The SSH logon password. You must set one of key_pair and login_password. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. |
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 public bandwidth of the node. Unit: Mbit/s. Value range: [1, 100]. |
5 |
| tags |
array |
No |
The tags that you want to add to the ECS instances. The 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 is expected to contain. We recommend that you set this parameter to a value that is greater than or equal to 2 to ensure that the cluster components run as expected. You can scale the node pool by adjusting this parameter. 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 pay-as-you-go instances that must be contained in the scaling group. Value range: [0, 1000]. If the number of pay-as-you-go instances is less than this value, the system prioritizes the creation of pay-as-you-go instances. |
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 specified by on_demand_base_capacity. Value range: [0, 100]. |
20 |
| spot_instance_pools |
integer |
No |
The number of instance types that are available. The scaling group evenly creates spot instances of multiple instance types that offer the lowest cost. Value range: [1, 10]. |
5 |
| spot_instance_remedy |
boolean |
No |
Specifies whether to enable the instance replacement feature. If you enable this feature, the scaling group attempts to create a new instance to replace a spot instance that is about to be reclaimed. Valid values:
|
false |
| compensate_with_on_demand |
boolean |
No |
If multi_az_policy is set to COST_OPTIMIZED, specifies whether to allow the system to automatically create pay-as-you-go instances to meet the requirement on the number of ECS instances when spot instances cannot be created due to reasons such as price and inventory. Valid values:
|
true |
| rds_instances |
array |
No |
A list of ApsaraDB RDS instances. |
|
|
string |
No |
The ID of the ApsaraDB RDS instance. If you specify a list of ApsaraDB RDS instances, the ECS instances of the cluster nodes are automatically added to the whitelist of the ApsaraDB 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 you set match_criteria to Target, you must specify the ID of the private pool. |
eap-bp67acfmxazb4**** |
| match_criteria |
string |
No |
The type of the private node pool. This parameter specifies the private pool capacity option for instance creation. After an Elastic Assurance Service (EAS) or a Capacity Reservation Service (CRS) takes effect, a private pool is generated. You can select a private pool to start instances. 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 property configurations. |
|
| instance_patterns |
No |
The instance properties. |
||
| deploymentset_id |
string |
No |
The deployment set to which the ECS instances in the node pool belong. This parameter takes effect only for incremental nodes. The deployment set of existing nodes is 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 to create instances. If you set this parameter, note the following rules: This parameter takes effect only when you create pay-as-you-go instances. This parameter cannot be specified together with private_pool_options.match_criteria and private_pool_options.id. |
|
| strategy |
string |
No |
The resource pool policy that is used to create instances. A resource pool includes a private pool generated after an Elastic Assurance Service (EAS) or a Capacity Reservation Service (CRS) takes effect, and a public pool. You can select a resource pool to start instances. Valid values: PrivatePoolFirst: The system prioritizes the use of private pools. If you specify resouce_pool_options.private_pool_ids, the system prioritizes the use of the specified private pools. If you do not specify private pools or the specified private pools are insufficient, the system automatically matches private pools of the Open type. If no eligible private pools are found, the system uses public resources to create instances. PrivatePoolOnly: The system uses only private pools. If you select this option, you must specify resouce_pool_options.private_pool_ids. If the specified private pools are insufficient, the instances fail to be started. None: The system does not use a resource pool policy. Default value: None. |
PrivatePoolFirst |
| private_pool_ids |
array |
No |
A list of private pool IDs. The private pool IDs are the IDs of EASs or CRSs. You can specify only the IDs of private pools in Target mode. N can be an integer from 1 to 20. |
|
|
string |
No |
The private pool ID. The private pool ID is the ID of an EAS or a CRS. 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 node labels. You can add labels to the nodes in a Kubernetes cluster. Rules for defining labels:
|
|
| tag |
No |
The node label. |
||
| taints |
array |
No |
The node taint configurations. |
|
| taint |
No |
The node taint configurations. |
||
| 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 if the Kubernetes version of the cluster is 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 the node is added to the cluster, the custom 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 the monitoring information of 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 the node is added to the cluster, the pre-custom 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 a prefix, the IP address of the node, and a suffix The prefix and suffix can be 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 (,). Example: If you pass 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 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 node labels and taints. |
true |
| concurrency |
boolean |
No |
Specifies whether to run the operation 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.