You can call the ModifyClusterNodePool operation to modify the configuration of a node pool with the specified node pool ID.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:ModifyClusterNodePool | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId} |
| none |
Request syntax
PUT /clusters/{ClusterId}/nodepools/{NodepoolId} HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | c23421cfa74454bc8b37163fd19af**** |
NodepoolId | string | Yes | The node pool ID. | p31da1b38983f4511b490fc62108a**** |
body | object | No | The request body. | |
nodepool_info | object | No | The configurations of the node pool. | |
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. Instances that are added to the node pool belong to this resource group. Each resource can belong only to one resource group. You can regard a resource group as a project, an application, or an organization based on your business scenarios. | rg-acfmyvw3wjm**** |
auto_scaling | object | No | The configurations about auto scaling. | |
enable | boolean | No | Specifies whether to enable auto scaling. Valid values:
If you set this parameter to false, other parameters in the Default value: | true |
typedeprecated | string | No | The instance type that is used for auto scaling. Valid values:
Default value: | cpu |
max_instances | long | No | The maximum number of nodes that can be created in the node pool. Existing instances are excluded. This parameter takes effect only when The value must be at least the value of min_instances and cannot exceed 2000. Default value: 0. | 10 |
min_instances | long | No | The minimum number of nodes that must be kept in the node pool. Existing instances are excluded. This parameter takes effect only when The value must be at least 0 and cannot exceed the value of max_instances. Default value: 0. Note
| 2 |
is_bond_eipdeprecated | boolean | No | This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead.
Default value: | true |
eip_internet_charge_typedeprecated | string | No | This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead. The metering method of the EIP. Valid values:
Default value: | PayByBandwidth |
eip_bandwidthdeprecated | long | No | This parameter is deprecated. Use the internet_charge_type and internet_max_bandwidth_out parameters instead. The maximum bandwidth of the EIP. Valid values: 1 to 100. Unit: Mbit/s. | 5 |
management | object | No | The configurations of the managed node pool feature. | |
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 if
Default value: | true |
auto_repair_policy | object | No | The auto node repair policy. | |
restart_node | boolean | No | Specifies whether ACK is allowed to automatically restart nodes after repairing the nodes. Valid values:
| true |
auto_vul_fix | boolean | No | Specifies whether ACK is allowed to automatically patch CVE vulnerabilities. Valid values:
| true |
auto_vul_fix_policy | object | No | The auto CVE patching policy. | |
restart_node | boolean | No | Specifies whether ACK is allowed to automatically restart nodes after repairing the nodes. Valid values:
| true |
vul_level | string | No | The severity levels of CVEs that can be automatically patched. Separate multiple levels with commas (,). Example:
If | asap,nntf |
auto_upgrade | boolean | No | Specifies whether to enable auto upgrade. Valid values:
| true |
auto_upgrade_policy | object | No | The auto upgrade policy. | |
auto_upgrade_kubelet | boolean | No | Specifies whether ACK is allowed to automatically upgrade the kubelet. Valid values:
| true |
auto_upgrade_runtime | boolean | No | Specifies whether ACK is allowed to automatically upgrade the runtime. This parameter takes effect only when you specify
Default value: | false |
auto_upgrade_os | boolean | No | Specifies whether ACK is allowed to automatically upgrade the operating system. This parameter takes effect only when you specify
Default value: | false |
upgrade_configdeprecated | object | No | This parameter is deprecated. Use the preceding The configurations of auto upgrade. The configurations take effect only when | |
auto_upgradedeprecated | boolean | No | This parameter is deprecated. Use the preceding Specifies whether to enable auto upgrade. Valid values:
Default value: | true |
surge | long | No | The number of additional nodes that are temporarily added to the node pool during an auto upgrade. Specify this parameter or A node is unavailable during an upgrade. Additional nodes are used to temporarily host the workloads of nodes that are being upgraded. Note
We recommend that you specify a value that does not exceed the current number of nodes in the node pool.
| 5 |
surge_percentage | long | No | The percentage of additional nodes in the node pool. Specify this parameter or the The number of additional nodes = The percentage of additional nodes × The number of nodes in the node pool. For example, if the percentage of additional nodes is 50% and the number of nodes in the node pool is 6, the number of additional nodes is 3. | 0 |
max_unavailable | long | No | The maximum number of nodes that can be in the Unavailable state. Valid values: 1 to 1000. Default value: 1. | |
scaling_group | object | No | The configurations of the scaling group that is used by the node pool. | |
vswitch_ids | array | No | The vSwitch IDs. You can specify one to eight vSwitch IDs. Note
To ensure high availability, we recommend that you select vSwitches that reside in different zones.
| |
string | No | The vSwitch ID. | vsw-wz9uwxhawmtzg7u9h**** | |
instance_types | array | No | The instance types. You can specify multiple instance types. A node is assigned the instance type from the first instance type of the list until the node is created. The instance type that is used to create the node varies based on the actual instance stock. You can specify 1 to 10 instance types. | |
string | No | The instance type. For more information about the valid values, 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 | long | No | The subscription duration of nodes in the node pool. This parameter takes effect and is required if you set
| 1 |
period_unit | string | No | The billing cycle of nodes in the node pool. This parameter takes effect and is required if you set
Default value: | Month |
auto_renew | boolean | No | Specifies whether to enable auto-renewal for the nodes in the node pool. This parameter takes effect only when you set
Default value: | true |
auto_renew_period | long | No | The auto-renewal period. Valid values:
Default value: 1. | 1 |
spot_strategy | string | No | The bidding policy of preemptible instances. Valid values:
For more information, see Create a preemptible elastic container instance. | SpotWithPriceLimit |
spot_price_limit | array<object> | No | The bid configurations of preemptible instances. | |
object | No | The bid configurations of preemptible instances. | ||
instance_type | string | No | The instance type of preemptible instances. | ecs.c6.large |
price_limit | string | No | The price cap of a preemptible instance. Unit: USD/hour. | 0.39 |
image_type | string | No | The type of operating system distribution that you want to use. We recommend that you use this parameter to specify the node operating system. Valid values:
| AliyunLinux |
image_id | string | No | The custom image ID. You can call the | aliyun_2_1903_x64_20G_alibase_20200904.vhd |
system_disk_category | string | No | The category of the system disk. Valid values:
Default value: | cloud_efficiency |
system_disk_categories | array | No | The categories of the system disk. The system attempts to create system disks of a disk category with a lower priority if the disk category with a higher priority is unavailable. | |
string | No | The category of the system disk. Valid values:
| cloud_essd | |
system_disk_size | long | No | The size of the system disk. Unit: GiB Valid values: 20 to 2048. The value of this parameter must be at least 20 and greater than or equal to the size of the image. Default value: the greater value between 40 and the image size. | 120 |
system_disk_performance_level | string | No | The performance level (PL) of the system disk. This parameter takes effect only for an ESSD. You can specify a higher PL if you increase the size of the data disk. 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 Key Management Service (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. Set the value to aes-256. | aes-256 |
system_disk_provisioned_iops | long | No | The preset IOPS of the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}. Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. This parameter is effective only when | 1000 |
system_disk_bursting_enabled | boolean | No | Specifies whether to enable the burst feature for the system disk. Valid values:
This parameter is effective only when | true |
data_disks | array | No | The configurations of the data disks that are mounted to nodes in the node pool. Valid values: 0 to 10. You can mount at most 10 data disks to the nodes in the node pool. | |
data_disk | No | The configuration of node data disks. | ||
key_pair | string | No | The name of the key pair. You must specify this parameter or | pro-nodepool |
login_password | string | No | The password for SSH logon. You must specify this parameter or | Hello1234 |
internet_charge_type | string | No | The metering method of the public IP address. Valid values:
| PayByBandwidth |
internet_max_bandwidth_out | long | No | The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100. | 5 |
tags | array | No | The tags that you want to add only to ECS instances. The tag key must be unique and cannot exceed 128 characters in length. The tag key and value cannot start with aliyun or acs: or contain https:// or http://. | |
tag | No | The tag that you want to add only to ECS instances. | ||
desired_size | long | No | The expected number of nodes in the node pool. The expected number of nodes in the node pool. We recommend that you configure at least two nodes to ensure that cluster components run as expected. You can modify the Expected Nodes parameter to adjust the number of nodes in the node pool. If you do not want to create nodes in the node pool, set this parameter to 0. You can manually modify this parameter to add nodes later. | 2 |
multi_az_policy | string | No | The ECS instance scaling policy for 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 | long | No | The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is less than the value of this parameter, the system preferably creates pay-as-you-go instances. | 0 |
on_demand_percentage_above_base_capacity | long | No | The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by | 20 |
spot_instance_pools | long | No | The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10. | 5 |
spot_instance_remedy | boolean | No | Specifies whether to enable the supplementation of preemptible instances. If you set this parameter to true, when the scaling group receives a system message indicating that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace the instance. 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 if preemptible instances cannot be created due to reasons such as the price or insufficient inventory. This parameter takes effect when you set
| true |
rds_instances | array | No | The IDs of ApsaraDB RDS instances. | |
string | No | The ID of the ApsaraDB RDS instance. After you specify the list of ApsaraDB RDS instances, the ECS instances in the cluster 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 private node pool ID. This parameter is available only when | eap-bp67acfmxazb4**** |
match_criteria | string | No | The type of private node pool. This parameter specifies the type of private pool that you want to use to create instances. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. The system selects a private pool to start instances. Valid values:
| Open |
platformdeprecated | string | No | This parameter is obsolete. Use the The OS platform. Valid values:
| AliyunLinux |
instance_patterns | array | No | .The instance attributes. | |
instance_patterns | No | The instance attribute. | ||
kubernetes_config | object | No | The configurations of the cluster. | |
labels | array | No | The labels that are added to the nodes in the cluster. You must add the label based on the following rules:
| |
tag | No | The node label. | ||
taints | array | No | The configurations of node taints. | |
taint | No | The taint. | ||
runtime | string | No | The name of the container runtime. The following types of runtime are supported by ACK:
Default value: containerd. | docker |
runtime_version | string | No | The version of the container runtime. | 19.03.5 |
cpu_policy | string | No | The CPU management policy of nodes in the node pool. 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 nodes are unschedulable after a scale-out activity is performed.
| false |
user_data | string | No | The user data of the instance. Nodes automatically run user-data scripts after they are added to the cluster. For more information, see User-Data script. | IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
cms_enabled | boolean | No | Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed on ECS nodes, you can view monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values:
Default value: | true |
pre_user_data | string | No | Predefined custom data. Nodes automatically run predefined scripts before they are added to the cluster. For more information, see User-Data script. | IyEvdXNyL2Jpbi9iYXNoCmVjaG8gIkhlbGxvIEFDSyEi |
tee_config | object | No | The configurations of confidential computing for the cluster. | |
tee_enable | boolean | No | Specifies whether to enable confidential computing for the cluster. Valid values:
Default value: | false |
update_nodes | boolean | No | Specifies whether to update node information, such as labels and taints. | true |
concurrency | boolean | No | Specifies whether concurrency is supported. | true |
Response parameters
Examples
Sample success responses
JSON
format
{
"task_id": "T-5fd211e924e1d00787000293",
"nodepool_id": "np737c3ac1ac684703b9e10673aa2c****",
"request_id": "687C5BAA-D103-4993-884B-C35E4314****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-27 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-06-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-06-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-04-19 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-01-19 | The response structure of the API has changed | View Change Details |
2023-12-15 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-12-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-10-17 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-08-30 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-08-10 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2020-09-23 | The internal configuration of the API is changed, but the call is not affected | View Change Details |