You can call the DescribeClusterNodes operation to query information about the nodes in a specified Container Service for Kubernetes (ACK) cluster.
Debugging
Request syntax
GET /clusters/ClusterId/nodes?instanceIds=String&nodepool_id=String&state=String&pageSize=String&pageNumber=String HTTP/1.1
Content-Type:application/json
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
ClusterId | String | Yes | c82e6987e2961451182edacd74faf**** |
The ID of the cluster that you want to query. |
Parameter | Type | Required | Examples | Description |
---|---|---|---|---|
instanceIds | String | No | "i-bp11xjhwkj8k966u****,i-bp1dmhc2bu5igkyq****" |
The IDs of the nodes that you want to query. Separate multiple node IDs with commas (,). |
nodepool_id | String | No | np**** |
The ID of the node pool. |
state | String | No | running |
The node state that you want to use to filter nodes. Valid values:
Default value: |
pageSize | String | No | 10 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
pageNumber | String | No | 1 |
The number of the page to return. Default value: 1. |
Response syntax
HTTP/1.1 200 OK
Content-Type:application/json
{
"nodes" : [ {
"creation_time" : "String",
"error_message" : "String",
"expired_time" : "String",
"host_name" : "String",
"image_id" : "String",
"instance_charge_type" : "String",
"instance_id" : "String",
"instance_name" : "String",
"instance_role" : "String",
"instance_status" : "String",
"instance_type" : "String",
"instance_type_family" : "String",
"ip_address" : [ "String" ],
"is_aliyun_node" : Boolean,
"node_name" : "String",
"node_status" : "String",
"nodepool_id" : "String",
"source" : "String",
"state" : "String"
} ],
"page" : {
"page_number" : Integer,
"page_size" : Integer,
"total_count" : Integer
}
}
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
nodes | Array of node |
The details of the nodes that are returned. |
|
creation_time | String | 2020-08-25T11:25:35+08:00 |
The time when the node was created. |
error_message | String | error*** |
The error message that was generated when the node was created. |
expired_time | String | 2099-12-31T23:59:00+08:00 |
The expiration time of the node. |
host_name | String | iZ2vcckdmxp7u0urj2k**** |
The name of the host. |
image_id | String | aliyun_2_1903_x64_20G_alibase_20200529.vhd |
The ID of the system image that is used by the node. |
instance_charge_type | String | PostPaid |
The billing method of the instance on which the node is deployed. Valid values:
|
instance_id | String | i-2vcckdmxp7u0urj2**** |
The ID of the instance on which the node is deployed. |
instance_name | String | worker-k8s-for-cs-c5cdf7e3938bc4f8eb0e44b21a80f**** |
The name of the instance on which the node is deployed. |
instance_role | String | Worker |
The role of the node. Valid values:
|
instance_status | String | Running |
The status of the node. |
instance_type | String | ecs.c5.xlarge |
The instance type of the node. |
instance_type_family | String | ecs.c5 |
The Elastic Compute Service (ECS) instance family of the node. |
ip_address | Array of String | 192.128.0.36 |
The IP address of the node. |
is_aliyun_node | Boolean | true |
Indicates whether the instance on which the node is deployed is provided by Alibaba Cloud. Valid values:
|
node_name | String | cn-chengdu.192.168.0.36 |
The name of the node. This name is the identifier of the node in the cluster. |
node_status | String | Ready |
Indicates whether the node is ready. Valid values:
|
nodepool_id | String | np0794239424a84eb7a95327369d56**** |
The ID of the node pool. |
source | String | ess_attach |
Indicates how the node is initialized. A node can be manually created or created by using Resource Orchestration Service (ROS). |
state | String | running |
The status of the node. Valid values:
|
spot_strategy | String | NoSpot |
The type of the preemptible instance. Valid values:
|
page | Object |
The pagination details. |
|
page_number | Integer | 1 |
The page number of the returned page. |
page_size | Integer | 10 |
The number of entries returned per page. |
total_count | Integer | 5 |
The total number of entries returned. |
Examples
Sample requests
GET /clusters/c82e6987e2961451182edacd74faf****/nodes?instanceIds="i-bp11xjhwkj8k966u****,i-bp1dmhc2bu5igkyq****"&nodepool_id=np****&state=running&pageSize=3&pageNumber=50 HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeClusterNodesResponse>
<nodes>
<creation_time>2020-08-25T11:25:35+08:00</creation_time>
<error_message>error***</error_message>
<expired_time>2099-12-31T23:59:00+08:00</expired_time>
<host_name>iZ2vcckdmxp7u0urj2k****</host_name>
<image_id>aliyun_2_1903_x64_20G_alibase_20200529.vhd</image_id>
<instance_charge_type>PostPaid</instance_charge_type>
<instance_id>i-2vcckdmxp7u0urj2****</instance_id>
<instance_name>worker-k8s-for-cs-c5cdf7e3938bc4f8eb0e44b21a80f****</instance_name>
<instance_role>Worker</instance_role>
<instance_status>Running</instance_status>
<instance_type>ecs.c5.xlarge</instance_type>
<instance_type_family>ecs.c5</instance_type_family>
<ip_address>192.128.0.36</ip_address>
<is_aliyun_node>true</is_aliyun_node>
<node_name>cn-chengdu.192.168.0.36</node_name>
<node_status>Ready</node_status>
<nodepool_id>np0794239424a84eb7a95327369d56****</nodepool_id>
<source>ess_attach</source>
<state>running</state>
</nodes>
<page>
<page_number>1</page_number>
<page_size>10</page_size>
<total_count>5</total_count>
</page>
</DescribeClusterNodesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"nodes" : [ {
"creation_time" : "2020-08-25T11:25:35+08:00",
"error_message" : "error***",
"expired_time" : "2099-12-31T23:59:00+08:00",
"host_name" : "iZ2vcckdmxp7u0urj2k****",
"image_id" : "aliyun_2_1903_x64_20G_alibase_20200529.vhd",
"instance_charge_type" : "PostPaid",
"instance_id" : "i-2vcckdmxp7u0urj2****",
"instance_name" : "worker-k8s-for-cs-c5cdf7e3938bc4f8eb0e44b21a80f****",
"instance_role" : "Worker",
"instance_status" : "Running",
"instance_type" : "ecs.c5.xlarge",
"instance_type_family" : "ecs.c5",
"ip_address" : [ "192.128.0.36" ],
"is_aliyun_node" : true,
"node_name" : "cn-chengdu.192.168.0.36",
"node_status" : "Ready",
"nodepool_id" : "np0794239424a84eb7a95327369d56****",
"source" : "ess_attach",
"state" : "running"
} ],
"page" : {
"page_number" : 1,
"page_size" : 10,
"total_count" : 5
}
}
Error codes
For a list of error codes, visit the API Error Center.