• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. API Reference 2.0
  4. API
  5. Cluster Management
  6. Obtaining Information About a Node in a Specified Cluster

Obtaining Information About a Node in a Specified Cluster

Function

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

URI

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

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.

node_id

Yes

Node 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 Node.

apiVersion

String

API version. The value is fixed to v3.

metadata

Table 3

Node metadata.

spec

Table 4

Node parameters.

status

Table 5

Node status.

Table 3 Data structure of the metadata field

Parameter

Type

Description

name

String

Node name.

uid

String

Node ID.

creationTimestamp

String

Node creation timestamp.

updateTimestamp

String

Node update timestamp.

annotations

String

Node annotation in the format of key/value.

Table 4 Data structure of the spec field

Parameter

Type

Description

flavor

String

Node specifications. For details, see the flavorRef parameter in Help Center > Elastic Cloud Server > API Reference > Extension ECS APIs > Lifecycle Management > Creating ECSs.

az

String

Name of the AZ where the node resides. For details, see the availability_zone parameter in Help Center > Elastic Cloud Server > API Reference > Extension ECS APIs > Lifecycle Management > Creating ECSs.

os

String

OS of the node.

login

Table 5

Parameters for logging in to the node.

rootVolume

Table 6

System disk parameters of the node.

dataVolumes

Table 6

Data disk parameters of a node. At present, only one data disk can be configured.

publicIP

Table 7

Elastic IP address parameters of a node.

billingMode

Integer

Billing mode of a node. Currently, only pay-per-use is supported.

Value:

0: pay-per-use

Table 5 Data structure of the status field

Parameter

Type

Description

phase

String

Status of a node. The value can be Build, Active, Abnormal, Deleting, Installing, or Upgrading.

serverId

String

ID of the VM where the node resides in the ECS.

publicIP

String

Elastic IP address of a node.

privateIP

String

Private IP address of a node.

Example response:

{
    "kind": "Node",
    "apiVersion": "v3",
    "metadata": {
        "name": "node-demo",
        "uid": "c33b6898-38c9-11e9-b246-0255ac101413",
        "creationTimestamp": "2019-02-25 01:39:38.91603 +0000 UTC",
        "updateTimestamp": "2019-02-25 06:51:54.639894 +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 6 describes the status code of the API.

Table 6 Status code

Status Code

Description

200

Information about the node in the specified cluster is successfully obtained.

For details about error status codes, see Status Codes.