All Products
Search
Document Center

Container Service for Kubernetes:DescribeClusterNodes

Last Updated:Dec 09, 2024

null

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cs:DescribeClusterNodesget
*Cluster
acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

GET /clusters/{ClusterId}/nodes HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

c82e6987e2961451182edacd74faf****
instanceIdsstringNo

The IDs of the nodes that you want to query. Separate multiple node IDs with commas (,).

"i-bp11xjhwkj8k966u****,i-bp1dmhc2bu5igkyq****"
nodepool_idstringNo

The node pool ID.

np****
statestringNo

The node state that you want to use to filter nodes. Valid values:

  • all: query nodes in the following four states.
  • running: query nodes in the running state.
  • removing: query nodes that are being removed.
  • initial: query nodes that are being initialized.
  • failed: query nodes that fail to be created.

Default value: all.

running
pageSizestringNo

The number of entries per page. Valid values: 1 to 100.

Default value: 10.

10
pageNumberstringNo

The page number.

Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

nodesarray<object>

The details of the nodes in the cluster.

nodeobject
creation_timestring

The time when the node was created.

2020-08-25T11:25:35+08:00
error_messagestring

The error message generated when the node was created.

error***
expired_timestring

The expiration date of the node.

2099-12-31T23:59:00+08:00
host_namestring

The name of the host.

iZ2vcckdmxp7u0urj2k****
image_idstring

The ID of the system image that is used by the node.

aliyun_2_1903_x64_20G_alibase_20200529.vhd
instance_charge_typestring

The billing method of the node. Valid values:

  • PrePaid: the subscription billing method. If the value is PrePaid, make sure that you have a sufficient balance or credit in your account. Otherwise, an InvalidPayMethod error is returned.
  • PostPaid: the pay-as-you-go billing method.
PostPaid
instance_idstring

The ID of the instance.

i-2vcckdmxp7u0urj2****
instance_namestring

The name of the instance on which the node is deployed.

worker-k8s-for-cs-c5cdf7e3938bc4f8eb0e44b21a80f****
instance_rolestring

The role of the node. Valid values:

  • Master: master node
  • Worker: worker node
Worker
instance_statusstring

The status of the node.

Running
instance_typestring

The type of the node.

ecs.c5.xlarge
instance_type_familystring

The ECS instance family of the node.

ecs.c5
ip_addressarray

The IP address of the node.

ipstring

The IP address.

192.168.0.36
is_aliyun_nodeboolean

Indicates whether the instance on which the node is deployed is provided by Alibaba Cloud. Valid values:

  • true: The instance is provided by Alibaba Cloud.
  • false: The instance is not provided by Alibaba Cloud.
true
node_namestring

The name of the node. This name is the identifier of the node in the cluster.

cn-chengdu.192.168.0.36
node_statusstring

Indicates whether the node is ready. Valid values:

  • Ready: The node is ready.
  • NotReady: The node is not ready.
  • Unknown: The status of the node is unknown.
  • Offline: The node is offline.
Ready
nodepool_idstring

The node pool ID.

np0794239424a84eb7a95327369d56****
sourcestring

Indicates how the node is initialized. A node can be manually created or created by using Resource Orchestration Service (ROS).

ess_attach
statestring

The status of the node. Valid values:

  • pending: The node is being created.
  • running: The node is running.
  • starting: The node is being started.
  • stopping: The node is being stopped.
  • stopped: The node is stopped.
running
spot_strategystring

The type of preemptible instance. Valid values:

  • NoSpot: a non-preemptible instance.
  • SpotWithPriceLimit: a preemptible instance that is configured with the highest bid price.
  • SpotAsPriceGo: a preemptible instance for which the system automatically bids based on the current market price.
NoSpot
pageobject

The pagination information.

page_numberinteger

The page number.

1
page_sizeinteger

The number of entries per page.

10
total_countinteger

The total number of entries returned.

5

Examples

Sample success responses

JSONformat

{
  "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.168.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",
      "spot_strategy": "NoSpot"
    }
  ],
  "page": {
    "page_number": 1,
    "page_size": 10,
    "total_count": 5
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history