You can call the DescribeClusterNodePools operation to query node pools in a Container Service for Kubernetes (ACK) cluster.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
GET /clusters/{ClusterId}/nodepools HTTP/1.1
Request parameters
|
Parameter |
Type |
Position |
Required |
Example |
Description |
| ClusterId | String | Path | Yes | cc0f87de0b8fb403f86e10e204f83**** | The cluster ID. |
Response parameters
Parameter |
Type |
Example |
Description |
| nodepools | Array | The list of the returned node pools. |
|
| auto_scaling | Object | The configurations about auto scaling. |
|
| eip_bandwidth | Long | 5 | The maximum bandwidth of the elastic IP address (EIP) that is associated with the node pool. |
| is_bond_eip | Boolean | true | Indicates whether an EIP is associated with the node pool. Valid values:
|
| eip_internet_charge_type | String | PayByBandwidth | The billing method of the EIP. Valid values:
|
| enable | Boolean | true | Indicates whether auto scaling is enabled.
|
| max_instances | Long | 10 | The maximum number of Elastic Compute Service (ECS) instances that can be created in the node pool. |
| min_instances | Long | 2 | The minimum number of ECS instances that must be kept in the node pool. |
| type | String | cpu | The instance types that can be used for the auto scaling of the node pool. Valid values:
|
| kubernetes_config | Object | The configurations of the cluster where the node pool is deployed. |
|
| cms_enabled | Boolean | true | Indicates where the CloudMonitor agent is installed on ECS nodes of the cluster. After the CloudMonitor agent is installed, you can view monitoring information about the ECS instances in the CloudMonitor console. Installation is recommended. Valid values:
|
| cpu_policy | String | none | The CPU management policy of the nodes in a node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later.
|
| labels | Array of tag | 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:
|
|
| runtime | String | docker | The name of the container runtime. |
| runtime_version | String | 19.03.5 | The version of the container runtime. |
| taints | Array of taint | The taints of the nodes. Taints are added to nodes to prevent pods from being scheduled to inappropriate nodes. However, tolerations allow pods to be scheduled to nodes with matching taints. For more information, see Taints and Tolerations. |
|
| user_data | String | IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFD**** | The user data of the node pool. For more information, see Generate user data. |
| node_name_mode | String | customized,test.,5,.com | A custom node name consists of a prefix, an IP substring, and a suffix.
For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name will be aliyun.com00055test. |
| nodepool_info | Object | The information about the node pool. |
|
| created | String | 2020-09-27T19:14:09.156823496+08:00 | The time when the node pool was created. |
| is_default | Boolean | true | Indicates whether the node pool is a default node pool. A Container Service cluster usually has only one default node pool. Valid values:
|
| name | String | default-nodepool | 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 (-). |
| nodepool_id | String | np615c0e0966124216a0412e10afe0**** | The ID of the created node pool. |
| region_id | String | cn-beijing | The ID of the region. |
| resource_group_id | String | rg-acfmyvw3wjm**** | The ID of the resource group to which the node pool belongs. |
| type | String | ess | The type of the node pool. Valid values:
|
| updated | String | 2020-09-27T20:37:46+08:00 | The time when the node pool was last updated. |
| scaling_group | Object | The configuration of the scaling group. |
|
| auto_renew | Boolean | false | Indicates whether auto-renewal is enabled for the nodes in the node pool. This parameter takes effect only when
|
| auto_renew_period | Long | 0 | The duration of the auto-renewal. This parameter takes effect and is required only when If you specify |
| data_disks | Array of data_disk | The configurations of the data disks that are attached to the nodes in the node pool. The configurations include the disk type and disk size. |
|
| image_id | String | aliyun_2_1903_x64_20G_alibase_20200529.vhd | The ID of the custom image. You can call |
| instance_charge_type | String | PostPaid | The billing method of the nodes in a node pool. Valid values:
|
| instance_types | Array of String | ecs.n4.large | The instance types of the nodes in the node pool. |
| multi_az_policy | String | COST_OPTIMIZED | The ECS instance scaling policy for a multi-zone scaling group. Valid values:
|
| on_demand_base_capacity | Long | 0 | 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. |
| on_demand_percentage_above_base_capacity | Long | 20 | The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by |
| spot_instance_pools | Long | 5 | The number of instance types that are available. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10 |
| spot_instance_remedy | Boolean | false | Indicates whether preemptible instances are supplemented when the number of preemptible instances drops below the specified minimum number. 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: Valid values:
|
| compensate_with_on_demand | Boolean | true | Indicates whether pay-as-you-go instances are automatically created 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 only when
|
| period | Long | 1 | The subscription duration of the nodes in the node pool. This parameter takes effect and is required only when you set If you specify |
| period_unit | String | Month | The billing cycle of the nodes. This parameter takes effect only when Valid value: |
| platform | String | AliyunLinux | The release version of the operating system. Valid values:
|
| ram_policy | String | KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e**** | The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage ECS instances. |
| spot_strategy | String | NoSpot | The type of preemptible instance. Valid values:
For more information, see Preemptible instances. |
| spot_price_limit | Array | The bid configurations of preemptible instances. |
|
| instance_type | String | ecs.c6.large | The instance type of preemptible instances. |
| price_limit | String | 0.39 | The price limit of a single preemptible instance. Unit: USD/hour. |
| rds_instances | Array of String | rm-xxx | The IDs of the ApsaraDB RDS instances. |
| scaling_group_id | String | asg-2ze8n5qw4atggut8**** | The ID of the scaling group. |
| scaling_policy | String | release | The scaling mode of the scaling group. Valid values:
|
| security_group_id | String | sg-2ze1iuk12m2sb4c4**** | The ID of the security group to which the node pool is added. If the node pool is added to multiple security groups, the first ID in the value of |
| security_group_ids | Array of String | sg-2ze1iuk12m2sb4c4**** | The IDs of the security groups to which the node pool is added. |
| system_disk_category | String | cloud_efficiency | The type of system disk. Valid values:
|
| system_disk_size | Long | 120 | The system disk size of a node. Unit: GiB. Valid values: 20 to 500 |
| system_disk_performance_level | String | PL1 | The performance level (PL) of the system disk that you want to use for the node. This parameter takes effect only for enhanced SSDs (ESSDs). |
| tags | Array of tag | The labels that you want to add to the ECS instances. Each key must be unique and cannot exceed 128 characters in length. Neither keys nor values can start with aliyun or acs:. Neither keys nor values can contain https:// or http://. |
|
| vswitch_ids | Array of String | vsw-2ze3ds0mdip0hdz8i**** | The vSwitch ID. |
| login_password | String | ****** | The password for SSH logon. You must set this parameter or the For security purposes, the returned password is encrypted. |
| key_pair | String | pro-nodepool | The name of the key pair. You must set this parameter or the You must set |
| internet_charge_type | String | PayByBandwidth | The billing method of the public IP address of the node. |
| internet_max_bandwidth_out | Long | 10 | The maximum outbound bandwidth of the public IP address of the node. Unit: Mbit/s. Valid values: 1 to 100. |
| deploymentset_id | String | ds-bp1d19mmbsv3jf6xxxxx | The ID of the deployment set to which the ECS instances in the node pool belong. |
| desired_size | Long | 2 | The expected number of nodes in the node pool. |
| private_pool_options | Object | The private node pool options. |
|
| id | String | eap-bp67acfmxazb4**** | The ID of the private pool. The ID of a private node pool is the same as the ID of the elasticity assurance or capacity reservation for which the private node pool is generated. |
| match_criteria | String | Open | The type of private node pool. This parameter specifies the type of the private 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:
|
| status | Object | The status details about the node pool. |
|
| failed_nodes | Long | 0 | The number of failed nodes. |
| healthy_nodes | Long | 3 | The number of healthy nodes. |
| initial_nodes | Long | 0 | The number of nodes that are being created. |
| offline_nodes | Long | 0 | The number of offline nodes. |
| removing_nodes | Long | 0 | The number of nodes that are being removed. |
| serving_nodes | Long | 3 | The number of running nodes. |
| state | String | active | The status of the node pool. Valid values:
|
| total_nodes | Long | 3 | The total number of nodes in the node pool. |
| tee_config | Object | The configuration of confidential computing. |
|
| tee_enable | Boolean | false | Indicates whether confidential computing is enabled. Valid values:
|
| management | Object | The configurations of managed node pools. Managed node pools are available only in professional managed Kubernetes clusters. |
|
| enable | Boolean | true | Indicates whether the managed node pool feature is enabled. Valid values:
|
| auto_repair | Boolean | true | Indicates whether auto repair is enabled. This parameter takes effect only when
|
| upgrade_config | Object | The configuration of auto update. The configuration take effects only when |
|
| auto_upgrade | Boolean | true | Indicates whether auto update is enabled. Valid values:
|
| surge | Long | 5 | The number of additional nodes. |
| surge_percentage | Long | 50 | The percentage of additional nodes to the nodes in the node pool. You must set this parameter or The number of additional nodes = The percentage of additional nodes × The number of nodes in the node pool. For example, the percentage of additional nodes is set to 50% and the number of nodes in the node pool is six. The number of additional nodes will be three. |
| max_unavailable | Long | 1 | The maximum number of nodes that can be in the unschedulable state. Valid values: 1 to 1000. Default value: 1. |
| interconnect_config | Object | This parameter is deprecated. The network configuration of the edge node pool. This parameter takes effect only for edge node pools. |
|
| cen_id | String | cen-ey9k9nfhz0f******* | This parameter is deprecated. The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool. |
| ccn_id | String | ccn-qm5i0i0q9yi******* | This parameter is deprecated. The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool. |
| ccn_region_id | String | cn-shanghai | This parameter is deprecated. The region to which the CCN instance that is associated with the enhanced edge node pool belongs. |
| bandwidth | Long | 10 | This parameter is deprecated. The bandwidth of the enhanced edge node pool. Unit: Mbit/s. |
| improved_period | String | 1 | This parameter is deprecated. The subscription duration of the enhanced edge node pool. The duration is measured in months. |
| interconnect_mode | String | basic | The network type of the edge node pool. Valid values: basic and dedicated. This parameter takes effect only for edge node pools. |
| max_nodes | Long | 10 | The maximum number of nodes that are supported by the edge node pool. The value of this parameter must be equal to or greater than 0. A value of 0 indicates that the number of nodes in the node pool is limited only by the quota of nodes in the cluster. In most cases, this parameter is set to a value larger than 0 for edge node pools. This parameter is set to 0 for node pools whose types are ess or default edge node pools. |
| node_config | Object | The configurations of nodes. |
Examples
Sample requests
GET /clusters/cc0f87de0b8fb403f86e10e204f83****/nodepools HTTP/1.1
Content-Type:application/json
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeClusterNodePoolsResponse>
<nodepools>
<auto_scaling>
<eip_bandwidth>5</eip_bandwidth>
<is_bond_eip>true</is_bond_eip>
<eip_internet_charge_type>PayByBandwidth</eip_internet_charge_type>
<enable>true</enable>
<max_instances>10</max_instances>
<min_instances>2</min_instances>
<type>cpu</type>
</auto_scaling>
<kubernetes_config>
<cms_enabled>true</cms_enabled>
<cpu_policy>none</cpu_policy>
<labels>
<key>env</key>
<value>prod</value>
</labels>
<runtime>docker</runtime>
<runtime_version>19.03.5</runtime_version>
<taints>
<key>key</key>
<value>value</value>
<effect>NoSchedule</effect>
</taints>
<user_data>IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFD****</user_data>
</kubernetes_config>
<nodepool_info>
<created>2020-09-27T19:14:09.156823496+08:00</created>
<is_default>true</is_default>
<name>default-nodepool</name>
<nodepool_id>np615c0e0966124216a0412e10afe0****</nodepool_id>
<region_id>cn-beijing</region_id>
<resource_group_id>rg-acfmyvw3wjm****</resource_group_id>
<type>ess</type>
<updated>2020-09-27T20:37:46+08:00</updated>
</nodepool_info>
<scaling_group>
<auto_renew>false</auto_renew>
<auto_renew_period>0</auto_renew_period>
<data_disks>
<category>cloud_ssd</category>
<size>40</size>
<encrypted>true</encrypted>
<auto_snapshot_policy_id>sp-2zej1nogjvovnz4z****</auto_snapshot_policy_id>
</data_disks>
<image_id>aliyun_2_1903_x64_20G_alibase_20200529.vhd</image_id>
<instance_charge_type>PostPaid</instance_charge_type>
<instance_types>ecs.n4.large</instance_types>
<multi_az_policy>COST_OPTIMIZED</multi_az_policy>
<on_demand_base_capacity>0</on_demand_base_capacity>
<on_demand_percentage_above_base_capacity>20</on_demand_percentage_above_base_capacity>
<spot_instance_pools>5</spot_instance_pools>
<spot_instance_remedy>false</spot_instance_remedy>
<compensate_with_on_demand>true</compensate_with_on_demand>
<period>0</period>
<period_unit>Month</period_unit>
<platform>AliyunLinux</platform>
<ram_policy>KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****</ram_policy>
<spot_strategy>NoSpot</spot_strategy>
<spot_price_limit>
<instance_type>ecs.c6.large</instance_type>
<price_limit>0.39</price_limit>
</spot_price_limit>
<rds_instances>rm-xxx</rds_instances>
<scaling_group_id>asg-2ze8n5qw4atggut8****</scaling_group_id>
<scaling_policy>release</scaling_policy>
<security_group_id>sg-2ze1iuk12m2sb4c4****</security_group_id>
<security_group_ids>sg-2ze1iuk12m2sb4c4****</security_group_ids>
<system_disk_category>cloud_efficiency</system_disk_category>
<system_disk_size>120</system_disk_size>
<tags>
<key>env</key>
<value>prod</value>
</tags>
<vswitch_ids>vsw-2ze3ds0mdip0hdz8i****</vswitch_ids>
<login_password>******</login_password>
<key_pair>pro-nodepool</key_pair>
<internet_charge_type>PayByBandwidth</internet_charge_type>
<internet_max_bandwidth_out>10</internet_max_bandwidth_out>
</scaling_group>
<status>
<failed_nodes>0</failed_nodes>
<healthy_nodes>3</healthy_nodes>
<initial_nodes>0</initial_nodes>
<offline_nodes>0</offline_nodes>
<removing_nodes>0</removing_nodes>
<serving_nodes>3</serving_nodes>
<state>active</state>
<total_nodes>3</total_nodes>
</status>
<tee_config>
<tee_enable>false</tee_enable>
</tee_config>
<management>
<enable>true</enable>
<auto_repair>true</auto_repair>
<upgrade_config>
<auto_upgrade>true</auto_upgrade>
<surge>5</surge>
<surge_percentage>50</surge_percentage>
<max_unavailable>1</max_unavailable>
</upgrade_config>
</management>
</nodepools>
</DescribeClusterNodePoolsResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"nodepools" : [ {
"auto_scaling" : {
"eip_bandwidth" : 5,
"is_bond_eip" : true,
"eip_internet_charge_type" : "PayByBandwidth",
"enable" : true,
"max_instances" : 10,
"min_instances" : 2,
"type" : "cpu"
},
"kubernetes_config" : {
"cms_enabled" : true,
"cpu_policy" : "none",
"labels" : [ {
"key" : "env",
"value" : "prod"
} ],
"runtime" : "docker",
"runtime_version" : "19.03.5",
"taints" : [ {
"key" : "key",
"value" : "value",
"effect" : "NoSchedule"
} ],
"user_data" : "IyEvYmluL3NoCmVjaG8gIkhlbGxvIEFD****"
},
"nodepool_info" : {
"created" : "2020-09-27T19:14:09.156823496+08:00",
"is_default" : true,
"name" : "default-nodepool",
"nodepool_id" : "np615c0e0966124216a0412e10afe0****",
"region_id" : "cn-beijing",
"resource_group_id" : "rg-acfmyvw3wjm****",
"type" : "ess",
"updated" : "2020-09-27T20:37:46+08:00"
},
"scaling_group" : {
"auto_renew" : false,
"auto_renew_period" : 0,
"data_disks" : [ {
"category" : "cloud_ssd",
"size" : 40,
"encrypted" : "true",
"auto_snapshot_policy_id" : "sp-2zej1nogjvovnz4z****"
} ],
"image_id" : "aliyun_2_1903_x64_20G_alibase_20200529.vhd",
"instance_charge_type" : "PostPaid",
"instance_types" : [ "ecs.n4.large" ],
"multi_az_policy" : "COST_OPTIMIZED",
"on_demand_base_capacity" : 0,
"on_demand_percentage_above_base_capacity" : 20,
"spot_instance_pools" : 5,
"spot_instance_remedy" : false,
"compensate_with_on_demand" : true,
"period" : 0,
"period_unit" : "Month",
"platform" : "AliyunLinux",
"ram_policy" : "KubernetesWorkerRole-021dc54f-929b-437a-8ae0-34c24d3e****",
"spot_strategy" : "NoSpot",
"spot_price_limit" : [ {
"instance_type" : "ecs.c6.large",
"price_limit" : "0.39"
} ],
"rds_instances" : [ "rm-xxx" ],
"scaling_group_id" : "asg-2ze8n5qw4atggut8****",
"scaling_policy" : "release",
"security_group_id" : "sg-2ze1iuk12m2sb4c4****",
"security_group_ids" : [ "sg-2ze1iuk12m2sb4c4****" ],
"system_disk_category" : "cloud_efficiency",
"system_disk_size" : 120,
"tags" : [ {
"key" : "env",
"value" : "prod"
} ],
"vswitch_ids" : [ "vsw-2ze3ds0mdip0hdz8i****" ],
"login_password" : "******",
"key_pair" : "pro-nodepool",
"internet_charge_type" : "PayByBandwidth",
"internet_max_bandwidth_out" : 10
},
"status" : {
"failed_nodes" : 0,
"healthy_nodes" : 3,
"initial_nodes" : 0,
"offline_nodes" : 0,
"removing_nodes" : 0,
"serving_nodes" : 3,
"state" : "active",
"total_nodes" : 3
},
"tee_config" : {
"tee_enable" : false
},
"management" : {
"enable" : true,
"auto_repair" : true,
"upgrade_config" : {
"auto_upgrade" : true,
"surge" : 5,
"surge_percentage" : 50,
"max_unavailable" : 1
}
}
} ]
}
Error codes
For a list of error codes, see Service error codes.