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:
- The required resource types are displayed in bold characters.
- 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 | Write |
|
| none |
Request syntax
PUT /clusters/{ClusterId}/nodepools/{NodepoolId}
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. | rg-acfmyvw3wjm**** |
auto_scaling | object | No | The configuration of auto scaling. | |
enable | boolean | No | Specifies whether to enable auto scaling. Valid values:
Default value: | true |
type | string | No | The instance types that can be used for the auto scaling of the node pool. Valid values:
Default value: | cpu |
max_instances | long | No | The maximum number of Elastic Compute Service (ECS) instances that can be created in the node pool. | 10 |
min_instances | long | No | The minimum number of ECS instances that must be kept in the node pool. | 2 |
is_bond_eip | boolean | No | Specifies whether to associate an EIP with the node pool. Valid values:
Default value: | true |
eip_internet_charge_type | string | No | The metering method of the EIP. Valid values:
Default value: | PayByBandwidth |
eip_bandwidth | long | No | The maximum bandwidth of the elastic IP address (EIP). | 5 |
management | object | No | The configuration 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 repair. This parameter takes effect only when you specify
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 patching CVE vulnerabilities. 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 patching CVE vulnerabilities. Valid values:
| true |
vul_level | string | No | The severity levels of vulnerabilities that ACK is allowed to automatically patch. Multiple severity levels are separated by commas (,). | asap,nntf |
auto_upgrade | boolean | No | Specifies whether to enable auto update. Valid values:
| true |
auto_upgrade_policy | object | No | The auto update policy. | |
auto_upgrade_kubelet | boolean | No | Specifies whether ACK is allowed to automatically update the kubelet. Valid values:
| true |
upgrade_config | object | No | The configuration of auto update. The configuration takes effect only when | |
auto_upgrade | boolean | No | Specifies whether to enable auto update.
Default value: | true |
surge | long | No | The number of nodes that are temporarily added to the node pool during an auto update. Additional nodes are used to host the workloads of nodes that are being updated. Note
We recommend that you set the number of additional nodes to a value that does not exceed the current number of existing nodes.
| 5 |
surge_percentage | long | No | The percentage of additional nodes to the nodes in the node pool. You must set this parameter or | 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. | |
vswitch_ids | array | No | The IDs of vSwitches. You can specify 1 to 20 vSwitches. Note
To ensure high availability, we recommend that you select vSwitches in different zones.
| |
string | No | The vSwitch IDs. | vsw-wz9uwxhawmtzg7u9h**** | |
instance_types | array | No | A list of instance types. You can select multiple instance types. When the system needs to create a node, it 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 actual instance stock. | |
string | No | The type of instance. For more information, see Overview of 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 | long | No | The subscription duration of worker nodes. This parameter takes effect and is required only when If | 1 |
period_unit | string | No | The billing cycle of the nodes in the node pool. This parameter is required if you set The billing cycle is measured only in months. 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 duration of the auto-renewal. This parameter takes effect and is required only when you set If you specify | 1 |
spot_strategy | string | No | The bidding policy of preemptible instances. Valid values:
For more information, see Preemptible instances. | SpotWithPriceLimit |
spot_price_limit | 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 maximum bid price of a preemptible instance. Unit: USD/hour. | 0.39 |
image_type | string | No | The type of OS distribution that you want to use. To specify the node OS, we recommend that you use this parameter. Valid values: CentOS, AliyunLinux, AliyunLinux Qboot, AliyunLinuxUEFI, AliyunLinux3, Windows, WindowsCore, AliyunLinux3Arm64, and ContainerOS. | AliyunLinux |
image_id | string | No | The ID of the custom image. You can call the | aliyun_2_1903_x64_20G_alibase_20200904.vhd |
system_disk_category | string | No | The type of system disk. Valid values:
Default value: | cloud_efficiency |
system_disk_categories | array | No | The types of system disks. The system attempts to create system disks from a disk type with a lower priority when the disk type with a higher priority is unavailable. Valid values: cloud: disk cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: indicates an enhanced SSD (ESSD). | |
string | No | The type of system disk. | ||
system_disk_size | long | No | The size of the system disk in GiB. Valid values: 20 to 500. 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 that you want to use for the node. This parameter takes effect only for enhanced SSDs. You can specify a higher PL if you increase the size of the system disk. For more information, see ESSDs . | PL1 |
system_disk_encrypted | boolean | No | Indicates whether the system disk is encrypted. Valid values: true: encrypts the system disk. false: does not encrypt the system disk. | 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 algorithm that you want to use to encrypt the system disk. The value is aes-256. | aes-256 |
system_disk_provisioned_iops | long | No | The predefined read and write IOPS of the system disk when the disk type is cloud_auto. | 1000 |
system_disk_bursting_enabled | boolean | No | Indicates whether Burst is enabled for the system disk when the disk type is cloud_auto. | true |
data_disks | array | No | The configurations of the data disks that are mounted to the nodes in the node pool. You can mount 0 to 10 data disks. 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 set this parameter or the | pro-nodepool |
login_password | string | No | The password for SSH logon. You must set this parameter or the | 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 labels 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 must not start with aliyun or acs: or contain https:// or http://. | |
tag | No | The label to be added to the ECS instances. | ||
desired_size | long | No | The expected number of nodes in the node pool. | 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, Auto Scaling 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 supplement preemptible instances. If this parameter is set to true, when the scaling group receives a system message that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this 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 cost or insufficient inventory. This parameter takes effect when you set
| true |
rds_instances | array | No | A list of ApsaraDB RDS instances. | |
string | No | The ID of the ApsaraDB RDS for MySQL instance. After you specify the 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 configuration of the private node pool. | |
id | string | No | The ID of the private node pool. | eap-bp67acfmxazb4**** |
match_criteria | string | No | The type of private node pool. This parameter specifies the type of private node pool that you want to use to create instances. A private node pool is generated when an elasticity assurance or a capacity reservation service takes effect. The system selects a private node pool to launch instances. Valid values:
| Open |
platform | string | No | The operating system. Valid values:
| AliyunLinux |
kubernetes_config | object | No | The configuration of the cluster where the node pool is deployed. | |
labels | array | No | The labels of the nodes in the node pool. You can add labels to the nodes in the cluster. You must add labels based on the following rules:
| |
tag | No | The node label. | ||
taints | array | No | The configurations of node taints. | |
taint | No | The configurations of node taints. | ||
runtime | string | No | The name of the container runtime. | docker |
runtime_version | string | No | The version of the container runtime. | 19.03.5 |
cpu_policy | string | No | The CPU management policy of the 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 |
user_data | string | No | The user-defined data of the node pool. For more information, see Prepare user data. | 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 |
tee_config | object | No | The configurations about 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": ""
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||
---|---|---|---|---|
2024-01-19 | The response structure of the API has changed | see changesets | ||
| ||||
2023-12-15 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
| ||||
2023-12-13 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
| ||||
2023-10-17 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
| ||||
2022-08-30 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
| ||||
2022-08-10 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
| ||||
2020-09-23 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||
|