查询集群信息
更新时间 2022-12-22 18:03:44
最近更新时间: 2022-12-22 18:03:44
接口功能介绍
根据集群ID查看集群的详细信息。
接口约束
无
URI
GET /v1/cce/cluster/get
路径参数
无
Query参数
无
请求参数
请求头header参数
无
请求体body参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
clusterID | 是 | String | d0dc8ddc8e3e11eca6200242ac110003 | 集群唯一ID |
返回数据
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 请求成功(800)或者失败(900) | 800 | |
errorCode | String | 错误代码 | cce.cluster.xxxx | |
message | String | 错误信息的英文描述 | Invalid Request | |
description | String | 错误信息的中文描述 | 错误请求 | |
returnObj | Object | 返回集群信息 | {cluster} | returnObj |
表returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
regionID | String | 区域唯一ID | 81f7728662dd11ec810800155d307d5b | |
regionName | String | 区域名称,有些集群可能无法获取区域名称 | neimeng8 | |
clusterID | String | 集群唯一ID | d0dc8ddc8e3e11eca6200242ac110003 | |
clusterName | String | 集群名称 | cluster-demo | |
clusterType | String | 集群类型,取值: Kubernetes: 专有版集群 |
Kubernetes | |
createTime | Integer | 集群创建时间,1970年到现在时刻的秒差数值 | 0 | |
initVersion | String | 集群初始版本 | v1.20.2 | |
currentVersion | String | 集群当前版本 | v1.22.6 | |
upgradeableVersion | String | 集群可升级版本,如果无可升级版本则不输出 | v1.22.6 | |
apiServerEndpoints | Object | 集群API Server访问地址 | {endpoints} | apiServerEndpoints |
status | String | 集群状态 | running | |
vpcID | String | VPC唯一ID | 81f7728662dd11ec810800155d307d5b | |
podCidr | String | Pod网络地址段 | 10.0.0.0/8 | |
serviceCidr | String | Service网络地址段 | 192.168.0.0/16 | |
subnetIDs | Array | 子网ID列表 | ["02dc2a80-c6e3-e6c3-00bb-36aab64e2c9a"] |
表apiServerEndpoints
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
internalEndpoint | String | 内网访问地址 | https://101.227.53.165:6443 | |
publicEndpoint | String | 公网访问地址 | https://192.168.0.251:6443 |
请求示例
请求体body
GET https://cck-global.ctapi.ctyun.cn/v1/cce/cluster/get?clusterID=d0dc8ddc8e3e11eca6200242ac110003
Content-Type:application/json
响应示例
正常返回示例
HTTP/1.1 200 OK
Content-Type:application/json
{
"statusCode": 800,
"errorCode": "",
"returnObj": {
"regionID": "81f7728662dd11ec810800155d307d5b",
"regionName": "neimeng8",
"clusterID": "c3fb96524f9274b4495df0f12a6b5****",
"clusterName": "cluster-demo",
"clusterType": "Kubernetes",
"createTime": 0,
"initVersion": "v1.20.2",
"currentVersion": "v1.22.6",
"upgradeableVersion": "v1.22.6",
"apiServerEndpoints": {
"privateEndpoint": "https://101.227.53.165:6443",
"publicEndpoint": "https://192.168.0.251:6443"
},
"status" : "running",
"podCidr" : "172.21.0.0/16",
"servcieCidr": "192.168.0.0/16",
"vpcID" : "81f7728662dd11ec810800155d307d5b"
}
}