Queries the details of a Container Service for Kubernetes (ACK) cluster by cluster ID. The response includes the cluster's configuration, network settings, runtime state, and associated resource identifiers.
For the full API reference, see DescribeClusterDetail.
Prerequisites
Before you begin, ensure that you have:
An ACK cluster and its cluster ID
The
aliyunCLI installed and configured with valid credentials
Query cluster details
Send a GET request to the ACK API endpoint with the target cluster ID:
aliyun cs GET /clusters/<cluster_id>Replace <cluster_id> with the ID of the target cluster.
Request parameters
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
cluster_id | Path | Yes | String | The ID of the ACK cluster. |
Sample response
{
"clusterId": "cbfa079eb225c44e7bce86c626f0c****",
"clusterType": "Kubernetes",
"created": "2020-11-12T18:51:06+08:00",
"currentVersion": "1.11.5",
"deletionProtection": false,
"dockerVersion": "17.06.2-ce-5",
"externalLoadbalancerId": "lb-wz9gw2knznrpiv6sj****",
"instanceType": "ecs.se1ne.xlarge",
"name": "K8S-f5056244-24d4-11eb-b753-0242ac11****",
"networkMode": "vpc",
"regionId": "cn-shenzhen",
"resourceGroupId": "rg-acfmoiyerhu****",
"securityGroupId": "sg-wz97gjh27h6jgi41****",
"size": 5,
"state": "running",
"tags": [
{
"key": "ack.aliyun.com",
"value": "cbfa079eb225c44e7bce86c626f0c****"
}
],
"updated": "2020-11-12T19:04:01+08:00",
"vpcId": "vpc-wz9rqhtseeylp71x7****",
"vswitchCidr": "",
"vswitchId": "vsw-wz999pkyv5ybw4ork****",
"zoneId": "cn-shenzhen-b"
}Response fields
| Field | Type | Description |
|---|---|---|
clusterId | String | The ID of the cluster. |
clusterType | String | The cluster type. Value: Kubernetes. |
created | String | The time the cluster was created, in ISO 8601 format (UTC+8). |
currentVersion | String | The Kubernetes version running on the cluster. |
deletionProtection | Boolean | Specifies whether deletion protection is enabled. If true, the cluster cannot be deleted through the console or API. |
dockerVersion | String | The Docker version installed on the nodes. |
externalLoadbalancerId | String | The ID of the Server Load Balancer (SLB) instance attached to the cluster's API server. |
instanceType | String | The ECS instance type of the cluster nodes. |
name | String | The name of the cluster. |
networkMode | String | The network mode of the cluster. Value: vpc. |
regionId | String | The region where the cluster is deployed. |
resourceGroupId | String | The ID of the resource group the cluster belongs to. |
securityGroupId | String | The ID of the security group associated with the cluster nodes. |
size | Integer | The number of nodes in the cluster. |
state | String | The state of the cluster. |
tags | Array | The tags attached to the cluster. Each tag has a key and value. |
updated | String | The time the cluster was last updated, in ISO 8601 format (UTC+8). |
vpcId | String | The ID of the VPC the cluster is deployed in. |
vswitchCidr | String | The CIDR block of the vSwitch. Empty if not configured. |
vswitchId | String | The ID of the vSwitch the cluster nodes are attached to. |
zoneId | String | The zone where the cluster is deployed. |
References
该文章对您有帮助吗?