• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. API Reference
  4. Cluster and Host Management (Proprietary APIs)
  5. Obtaining Information About a Specified Cluster

Obtaining Information About a Specified Cluster

Function

This API is used to obtain the information about a specified cluster based on a UUID.

URI

GET /api/v1/clusters/{clusteruuid}

Table 1 describes the parameters of this API.

Table 1 Parameter description

Parameter

Mandatory

Description

clusteruuid

Yes

Cluster UUID.

Request

N/A

Response

Response parameters:

For the description about response parameters, see Table 1.

Example response:

{
    "kind": "cluster",
    "apiVersion": "v1",
    "metadata": {
        "name": "sit-cluster-94b5f",
        "uuid": "d5633999-d8e9-485e-af74-1913175696e6",
        "spaceuuid": "763e9dc1-b470-34c7-ede7-0d2229198c1a",
        "createAt": "2017-04-27 05:43:04.664929459 +0000 UTC",
        "updateAt": "2017-05-11 07:16:15.62414924 +0000 UTC"
    },
    "spec": {
        "description": "cce cluster",
        "hostList": {
            "kind": "list",
            "apiVersion": "v1",
            "metadata": {},
            "spec": {
                "hostList": [
                    {
                        "kind": "host",
                        "apiVersion": "v1",
                        "metadata": {
                            "name": "sit-cluster-94b5f-node-1",
                            "uuid": "e4222dec-421e-4479-a36b-3e95eebe6505",
                            "spaceuuid": "763e9dc1-b470-34c7-ede7-0d2229198c1a",
                            "createAt": "2017-04-27 05:43:07.791008293 +0000 UTC",
                            "updateAt": "2017-05-11 07:38:48.433948693 +0000 UTC"
                        },
                        "spec": {
                            "clusteruuid": "d5633999-d8e9-485e-af74-1913175696e6",
                            "clustername": "sit-cluster-94b5f",
                            "privateip": "192.168.0.248",
                            "publicip": "10.154.58.95",
                            "flavor": "s1.large",
                            "cpu": 2,
                            "memory": 8192,
                            "hostid": "e4222dec-421e-4479-a36b-3e95eebe6505",
                            "az": "eu-de-02",
                            "volume": [
                                {
                                    "diskType": "root",
                                    "diskSize": 40,
                                    "volumeType": "SAS"
                                },
                                {
                                    "diskType": "data",
                                    "diskSize": 100,
                                    "volumeType": "SAS"
                                }
                            ],
                            "sshkey": "KeyPair-bae5",
                            "status": {
                                "capacity": {
                                    "cpu": "2",
                                    "memory": "7973104Ki",
                                    "pods": "110"
                                },
                                "allocatable": {
                                    "cpu": "1.334",
                                    "memory": "7752568Ki",
                                    "pods": "110"
                                },
                                "conditions": [
                                    {
                                        "type": "OutOfDisk",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:42Z",
                                        "lastTransitionTime": "2017-04-27T05:58:40Z",
                                        "reason": "KubeletHasSufficientDisk",
                                        "message": "kubelet has sufficient disk space available"
                                    },
                                    {
                                        "type": "MemoryPressure",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:42Z",
                                        "lastTransitionTime": "2017-04-27T05:58:40Z",
                                        "reason": "KubeletHasSufficientMemory",
                                        "message": "kubelet has sufficient memory available"
                                    },
                                    {
                                        "type": "DiskPressure",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:42Z",
                                        "lastTransitionTime": "2017-04-27T05:58:40Z",
                                        "reason": "KubeletHasNoDiskPressure",
                                        "message": "kubelet has no disk pressure"
                                    },
                                    {
                                        "type": "Ready",
                                        "status": "True",
                                        "lastHeartbeatTime": "2017-05-11T07:39:42Z",
                                        "lastTransitionTime": "2017-04-27T05:58:40Z",
                                        "reason": "KubeletReady",
                                        "message": "kubelet is posting ready status"
                                    }
                                ],
                                "addresses": [
                                    {
                                        "type": "LegacyHostIP",
                                        "address": "192.168.0.248"
                                    },
                                    {
                                        "type": "InternalIP",
                                        "address": "192.168.0.248"
                                    },
                                    {
                                        "type": "Hostname",
                                        "address": "192.168.0.248"
                                    }
                                ],
                                "daemonEndpoints": {
                                    "kubeletEndpoint": {
                                        "Port": 10250
                                    }
                                },
                                "nodeInfo": {
                                    "machineID": "f21bcad2f362498d924ac24efcdd3e2a",
                                    "systemUUID": "236EC4DA-DE2B-4731-8B73-5700D48B79CC",
                                    "bootID": "fad71a86-4084-4537-9c43-d893b6f474fd",
                                    "kernelVersion": "3.10.0-229.42.1.97.x86_64",
                                    "osImage": "EulerOS V2.0SP1",
                                    "containerRuntimeVersion": "docker://1.11.2",
                                    "kubeletVersion": "v1.5.0+$Format:%h$",
                                    "kubeProxyVersion": "v1.5.0+$Format:%h$"
                                },
                                    "kernelVersion": "3.10.0-229.42.1.97.x86_64",
                                    "osImage": "EulerOS V2.0SP1",
                                    "containerRuntimeVersion": "docker://1.11.2",
                                    "kubeletVersion": "v1.5.0+$Format:%h$",
                                    "kubeProxyVersion": "v1.5.0+$Format:%h$"
                                },
                                    "kernelVersion": "3.10.0-229.42.1.97.x86_64",
                                    "osImage": "EulerOS V2.0SP1",
                                    "containerRuntimeVersion": "docker://1.11.2",
                                    "kubeletVersion": "v1.5.0+$Format:%h$",
                                    "kubeProxyVersion": "v1.5.0+$Format:%h$"
                                },
                                    "kernelVersion": "3.10.0-229.42.1.97.x86_64",
                                    "osImage": "EulerOS V2.0SP1",
                                    "containerRuntimeVersion": "docker://1.11.2",
                                    "kubeletVersion": "v1.5.0+$Format:%h$",
                                    "kubeProxyVersion": "v1.5.0+$Format:%h$"
                                },
                                "images": [
                                    {
                                        "names": [
                                            "fluentd:1.11"
                                        ],
                                        "sizeBytes": 617825114
                                    },
                                    {
                                        "names": [
                                            "10.154.57.150:443/kkfww002/apache-php:latest"
                                        ],
                                        "sizeBytes": 244663227
                                    },
                                    {
                                        "names": [
                                            "ops_agent:node"
                                        ],
                                        "sizeBytes": 200491883
                                    },
                                    {
                                        "names": [
                                            "kube-proxy:178e4172fb1df7fbf14c340aae3be0b3"
                                        ],
                                        "sizeBytes": 175577071
                                    },
                                    {
                                        "names": [
                                            "kubedns-amd64:1.5"
                                        ],
                                        "sizeBytes": 50815316
                                    },
                                    {
                                        "names": [
                                            "etcd:2.2.1"
                                        ],
                                        "sizeBytes": 28191895
                                    },
                                    {
                                        "names": [
                                            "exechealthz-amd64:1.0"
                                        ],
                                        "sizeBytes": 7115733
                                    },
                                    {
                                        "names": [
                                            "kube-dnsmasq-amd64:1.3"
                                        ],
                                        "sizeBytes": 5125973
                                    },
                                    {
                                        "names": [
                                            "pause:2.0"
                                        ],
                                        "sizeBytes": 350164
                                    }
                                ]
                            }
                        },
                        "replicas": 1,
                        "status": "ACTIVE",
                        "message": "sit-cluster-94b5f-node-1"
                    },
                    {
                        "kind": "host",
                        "apiVersion": "v1",
                        "metadata": {
                            "name": "sit-cluster-94b5f-node-2",
                            "uuid": "b5ea679c-d3be-4f52-a0f4-0ea3acd15934",
                            "spaceuuid": "763e9dc1-b470-34c7-ede7-0d2229198c1a",
                            "createAt": "2017-04-27 06:01:14.637647049 +0000 UTC",
                            "updateAt": "2017-05-11 07:38:48.479566577 +0000 UTC"
                        },
                        "spec": {
                            "clusteruuid": "d5633999-d8e9-485e-af74-1913175696e6",
                            "clustername": "sit-cluster-94b5f",
                            "privateip": "192.168.0.253",
                            "publicip": "10.154.58.139",
                            "flavor": "s1.xlarge",
                            "cpu": 4,
                            "memory": 16384,
                            "hostid": "b5ea679c-d3be-4f52-a0f4-0ea3acd15934",
                            "az": "eu-de-02",
                            "volume": [
                                {
                                    "diskType": "root",
                                    "diskSize": 40,
                                    "volumeType": "SATA"
                                },
                                {
                                    "diskType": "data",
                                    "diskSize": 100,
                                    "volumeType": "SATA"
                                }
                            ],
                            "sshkey": "KeyPair-bae5",
                            "status": {
                                "capacity": {
                                    "cpu": "4",
                                    "memory": "16230604Ki",
                                    "pods": "110"
                                },
                                "allocatable": {
                                    "cpu": "2.932",
                                    "memory": "15937636Ki",
                                    "pods": "110"
                                },
                                "conditions": [
                                    {
                                        "type": "OutOfDisk",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:49Z",
                                        "lastTransitionTime": "2017-04-27T06:10:28Z",
                                        "reason": "KubeletHasSufficientDisk",
                                        "message": "kubelet has sufficient disk space available"
                                    },
                                    {
                                        "type": "MemoryPressure",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:49Z",
                                        "lastTransitionTime": "2017-04-27T06:10:28Z",
                                        "reason": "KubeletHasSufficientMemory",
                                        "message": "kubelet has sufficient memory available"
                                    },
                                    {
                                        "type": "DiskPressure",
                                        "status": "False",
                                        "lastHeartbeatTime": "2017-05-11T07:39:49Z",
                                        "lastTransitionTime": "2017-04-27T06:10:28Z",
                                        "reason": "KubeletHasNoDiskPressure",
                                        "message": "kubelet has no disk pressure"
                                    },
                                    {
                                        "type": "Ready",
                                        "status": "True",
                                        "lastHeartbeatTime": "2017-05-11T07:39:49Z",
                                        "lastTransitionTime": "2017-04-27T06:10:28Z",
                                        "reason": "KubeletReady",
                                        "message": "kubelet is posting ready status"
                                    }
                                ],
                                "addresses": [
                                    {
                                        "type": "LegacyHostIP",
                                        "address": "192.168.0.253"
                                    },
                                    {
                                        "type": "InternalIP",
                                        "address": "192.168.0.253"
                                    },
                                    {
                                        "type": "Hostname",
                                        "address": "192.168.0.253"
                                    }
                                ],
                                "daemonEndpoints": {
                                    "kubeletEndpoint": {
                                        "Port": 10250
                                    }
                                },
                                "nodeInfo": {
                                    "machineID": "f21bcad2f362498d924ac24efcdd3e2a",
                                    "systemUUID": "DB6D465A-BA24-4CD7-BDE8-CF49D29058DF",
                                    "bootID": "df969e86-b870-4c4a-bc8d-3941ac9feb1a",
                                    "kernelVersion": "3.10.0-229.42.1.97.x86_64",
                                    "osImage": "EulerOS V2.0SP1",
                                    "containerRuntimeVersion": "docker://1.11.2",
                                    "kubeletVersion": "v1.5.0+$Format:%h$",
                                    "kubeProxyVersion": "v1.5.0+$Format:%h$"
                                },
                                "images": [
                                    {
                                        "names": [
                                            "fluentd:1.11"
                                        ],
                                        "sizeBytes": 617825114
                                    },
                                    {
                                        "names": [
                                            "10.154.57.150:443/kkfww002/apache-php:latest"
                                        ],
                                        "sizeBytes": 244663227
                                    },
                                    {
                                        "names": [
                                            "ops_agent:node"
                                        ],
                                        "sizeBytes": 200491883
                                    },
                                    {
                                        "names": [
                                            "kube-proxy:178e4172fb1df7fbf14c340aae3be0b3"
                                        ],
                                        "sizeBytes": 175577071
                                    },
                                    {
                                        "names": [
                                            "10.154.57.150:443/kkfww002/redis:latest"
                                        ],
                                        "sizeBytes": 109208225
                                    },
                                    {
                                        "names": [
                                            "kubedns-amd64:1.5"
                                        ],
                                        "sizeBytes": 50815316
                                    },
                                    {
                                        "names": [
                                            "etcd:2.2.1"
                                        ],
                                        "sizeBytes": 28191895
                                    },
                                    {
                                        "names": [
                                            "exechealthz-amd64:1.0"
                                        ],
                                        "sizeBytes": 7115733
                                    },
                                    {
                                        "names": [
                                            "kube-dnsmasq-amd64:1.3"
                                        ],
                                        "sizeBytes": 5125973
                                    },
                                    {
                                        "names": [
                                            "pause:2.0"
                                        ],
                                        "sizeBytes": 350164
                                    }
                                ]
                            }
                        },
                        "replicas": 1,
                        "status": "ACTIVE",
                        "message": "node-0d187060-2b0f-11e7-ae3b-286ed488ca06"
                    }     
                ]
            }
        },
        "az": "eu-de-02",
        "cpu": 11,
        "memory": 45056,
        "vpc": "vpc-fec7",
        "vpcid": "0ec12a92-e6b1-49e6-a144-36f270731c0b",
        "subnet": "subnet-fec7",
        "endpoint": "https://192.168.0.80:5443",
        "external_endpoint": "https://172.20.50.188:5443",
        "security_group_id": "159585ee-e65d-4362-a6cd-66521c98a32d",
        "clustertype": "Single",
        "latestversion": {
            "version": "V1.1.0",
            "date": "2017-04-24 15:03:14.634515594 +0000 UTC"
        },
        "versioninfo": {
            "version": "V1.1.0",
            "date": "2017-04-24 15:03:14.634515594 +0000 UTC"
        }
    },
    "clusterStatus": {
        "status": "AVAILABLE"
     },
    "k8s_version":"1.5.0",
    "commit_id":"58b7c16a52c03e4a849874602be42ee71afdcab1"
}

Status Code

Table 2 describes the status code of this API.

Table 2 Status code

Status Code

Description

200

This operation succeeds, and information about the cluster is returned.

For the description about status codes, see section Status Codes.