• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. API Reference 2.0
  4. API
  5. Cluster Management
  6. Obtaining the List of Nodes of a Specified Cluster

Obtaining the List of Nodes of a Specified Cluster

Function

This API is used to obtain information about all nodes in a specified cluster.

URI

GET /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes

Table 1 describes the parameters of the API.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID.

cluster_id

Yes

Cluster ID.

Request

N/A

Response

Response parameters:

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

kind

String

API type. The value is fixed to List.

apiVersion

String

API version. The value is fixed to v3.

items

Table 2

-

Example response:

{
    "kind": "List",
    "apiVersion": "v3",
    "items": [
        {
            "kind": "Node",
            "apiVersion": "v3",
            "metadata": {
                "name": "node-demo",
                "uid": "c33b6898-38c9-11e9-b246-0255ac101413",
                "creationTimestamp": "2019-02-25 06:19:05.789461541 +0000 UTC",
                "updateTimestamp": "2019-02-25 06:19:05.789462592 +0000 UTC",
                "annotations": {
                    "kubernetes.io/node-pool.id": "eu-de-02#s2.large.1#EulerOS 2.2"
                }
            },
            "spec": {
                "flavor": "s2.large.1",
                "az": "eu-de-02",
                "os": "EulerOS 2.2",
                "login": {
                    "sshKey": "KeyPair-demo",
                },
                "rootVolume": {
                    "volumetype": "SATA",
                    "size": 40
                },
                "dataVolumes": [
                    {
                        "volumetype": "SATA",
                        "size": 100
                    }
                ],
                "publicIP": {
                    "eip": {
                        "bandwidth": {}
                    }
                },
                "billingMode": 0
            },
            "status": {
                "phase": "Active",
                "serverId": "99de97f0-a10a-4215-ace7-817de0136ff5",
                "privateIP": "192.168.0.218",
                "publicIP": "10.154.50.127"
            }
        }
    ]
}

Status Code

Table 3 describes the status code of the API.

Table 3 Status code

Status Code

Description

200

Information about all the nodes in the specified cluster is successfully obtained.

For details about error status codes, see Status Codes.