• 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 Specified Cluster

Obtaining Information About a Specified Cluster

Function

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

URI

GET /api/v3/projects/{project_id}/clusters/{cluster_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.

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

apiVersion

String

API version. The value is fixed to v3.

metadata

Table 3

-

spec

Table 4

-

status

Table 3

-

Table 3 Data structure of the status field

Parameter

Type

Description

phase

String

Cluster status.

endpoints

Table 4

Access address of the kube-apiserver in the cluster.

Table 4 Data structure of the endpoint field

Parameter

Type

Description

internal

String

Internal network address.

external

String

External network address.

external_otc

String

Endpoint of the cluster to be accessed through API Gateway.

Example response:

{
    "kind": "Cluster",
    "apiVersion": "v3",
    "metadata": {
        "name": "mycluster-demo",
        "uid": "40c54866-38c5-11e9-b246-0255ac101413",
        "creationTimestamp": "2019-02-25 06:19:05.789462 +0000 UTC",
        "updateTimestamp": "2019-02-25 06:21:50.214687 +0000 UTC"
    },
    "spec": {
        "type": "VirtualMachine",
        "flavor": "cce.s1.medium",
        "version": "v1.11.3-r1",
        "hostNetwork": {
            "vpc": "a8cc62dc-acc2-47d0-9bfb-3b1d776c520b",
            "subnet": "6d9e5355-85af-4a89-af28-243edb700db6"
        },
        "containerNetwork": {
            "mode": "overlay_l2",
            "cidr": "172.16.0.0/16"
        },
        "authentication": {
            "mode": "x509",
            "authenticatingProxy": {}
        },
        "billingMode": 0
    },
    "status": {
        "phase": "Available",
        "endpoints": {
            "internal": "https://192.168.0.68:5443",
            "external_otc": "https://a140174a-2f3e-11e9-9f91-0255ac101405.cce.eu-de.otc.t-systems.com"
        }
    }
}

Status Code

Table 5 describes the status code of the API.

Table 5 Status code

Status Code

Description

200

Information about the specified cluster is successfully obtained.

For details about error status codes, see Status Codes.