All Products
Search
Document Center

Container Service for Kubernetes:DescribeClusterDetail

更新時間:Nov 07, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

You can call the DescribeClusterDetail operation to query the details of a Container Service for Kubernetes (ACK) cluster by cluster ID.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:DescribeClusterDetailget
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

GET /clusters/{ClusterId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

cdde1f21ae22e483ebcb068a6eb7f****

Response parameters

ParameterTypeDescriptionExample
object

The response body parameters.

cluster_idstring

The cluster ID.

c82e6987e2961451182edacd74faf****
cluster_typestring
  • Kubernetes: ACK dedicated cluster.
  • ManagedKubernetes: ACK managed cluster. ACK managed clusters include ACK Basic clusters, ACK Pro clusters, ACK Serverless clusters (Basic and Pro), ACK Edge clusters (Basic and Pro), and ACK Lingjun clusters (Pro).
  • ExternalKubernetes: registered cluster.
Kubernetes
createdstring

The time when the cluster was created.

2019-11-25T15:50:20+08:00
init_versionstring

The initial Kubernetes version of the cluster.

1.16.6-aliyun.1
current_versionstring

The current Kubernetes version of the cluster. For more information about the Kubernetes versions supported by ACK, see Release notes for Kubernetes versions.

1.16.6-aliyun.1
next_versionstring

The Kubernetes version to which the cluster can be updated.

1.18.8-aliyun.1
deletion_protectionboolean

Indicates whether deletion protection is enabled for the cluster. If deletion protection is enabled, the cluster cannot be deleted in the Container Service console or by calling API operations. Valid values:

  • true: deletion protection is enabled for the cluster. This way, the cluster cannot be deleted in the Container Service console or by calling API operations.
  • false: deletion protection is disabled for the cluster. This way, the cluster can be deleted in the Container Service console or by calling API operations.
true
docker_versionstring

The Docker version that is used by the cluster.

19.03.5
external_loadbalancer_idstring

The ID of the Server Load Balancer (SLB) instance that is created for the Ingress of the cluster.

lb-2zehc05z3b8dwiifh****
meta_datastring

The metadata of the cluster.

\"Addons\":***
namestring

The name of the cluster.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).

cluster-demo
network_modestring

The network type of the cluster. Example: Virtual Private Cloud (VPC).

vpc
region_idstring

The region ID of the cluster.

cn-beijing
resource_group_idstring

The ID of the resource group to which the cluster belongs.

rg-acfmyvw3wjm****
security_group_idstring

The ID of the security group to which the cluster belongs.

sg-25yq****
container_cidrstring

The CIDR block of the pod.

172.20.0.0/16
service_cidrstring

The CIDR block of the Service.

172.21.0.0/20
proxy_modestring

The proxy mode. Valid values: ipvs and iptables.

ipvs
timezonestring

The time zone.

Asia/Shanghai
node_cidr_maskstring

The number of the IP addresses of the node.

26
ip_stackstring

The IP protocol stack of the cluster. Valid values:

  • ipv4: creates a cluster that supports only the IPv4 protocol stack.
  • dual: creates a cluster that supports IPv4/IPv6 dual-stack.
ipv4
cluster_domainstring

The on-premises domain name of the cluster.

cluster.local
sizelong

The number of nodes in the cluster. Master nodes and worker nodes are included.

5
statestring

The status of the cluster. Valid values:

  • initial: The cluster is being created.
  • failed: The cluster failed to be created.
  • running: The cluster is running.
  • updating: The cluster is being updated.
  • updating_failed: The cluster failed to be updated.
  • scaling: The cluster is being scaled.
  • waiting: The cluster is waiting for connection requests.
  • disconnected: The cluster is disconnected.
  • stopped: The cluster is stopped.
  • deleting: The cluster is being deleted.
  • deleted: The cluster is deleted.
  • delete_failed: The cluster failed to be deleted.
running
tagsarray

The resource tags of the cluster.

tag

The resource tags of the cluster.

updatedstring

The time when the cluster was updated.

2020-01-13T23:01:03+08:00
vpc_idstring

The ID of the VPC where the cluster is deployed. This parameter is required when you create a cluster.

vpc-2zecuu62b9zw7a7qn****
vswitch_iddeprecatedstring

The IDs of the vSwitches. You can select one to three vSwitches when you create a cluster. To ensure the high availability of the cluster, we recommend that you select vSwitches in different zones.

vsw-2zete8s4qocqg0mf6****,vsw-2zete8s4qocqg0mf6****
vswitch_idsarray

The vSwitch for the control plane of the cluster.

string

Cluster control plane virtual switch.

vsw-2zete8s4qocqg0mf6****
subnet_cidrdeprecatedstring

The pod CIDR block. It must be a valid and private CIDR block, and must be one of the following CIDR blocks or their subnets:

  • 10.0.0.0/8
  • 172.16-31.0.0/12-16
  • 192.168.0.0/16

The pod CIDR block cannot overlap with the CIDR block of the VPC in which the cluster is deployed and the CIDR blocks of existing clusters in the VPC. You cannot modify the pod CIDR block after you create the cluster.

For more information about the network planning of ACK clusters, see Plan CIDR blocks for an ACK cluster.

172.20.0.0/16
zone_idstring

The ID of the zone within the region where the cluster is located.

cn-beijing-a
master_urlstring

The endpoints of the cluster, including an internal endpoint and a public endpoint.

{\"intranet_api_server_endpoint\":\"https://192.168.0.251:6443\"***}
private_zoneboolean

Indicates whether Alibaba Cloud DNS PrivateZone (PrivateZone) is enabled for the cluster. Valid values:

  • true: PrivateZone is enabled.
  • false: PrivateZone is dislabled.

Default value: false

false
profilestring

If you set cluster_type to ManagedKubernetes, an ACK managed cluster is created. In this case, you can further specify the cluster edition.

  • Default. ACK managed cluster. ACK managed clusters include ACK Basic clusters and ACK Pro clusters.
  • Edge: ACK Edge cluster. ACK Edge clusters include ACK Edge Basic clusters and ACK Edge Pro clusters.
  • Serverless: ACK Serverless cluster. ACK Serverless clusters include ACK Serverless Basic clusters and ACK Serverless Pro clusters.
  • Lingjun: ACK Lingjun Pro cluster.
Default
cluster_specstring

After you set cluster_type to ManagedKubernetes and configure the profile parameter, you can further specify the edition of the cluster.

  • ack.pro.small: Pro.
  • ack.standard: Basic. If you leave the parameter empty, the Basic edition is selected.
ack.pro.small
worker_ram_role_namestring

The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage Elastic Compute Service (ECS) instances.

KubernetesWorkerRole-ec87d15b-edca-4302-933f-c8a16bf0****
maintenance_windowmaintenance_window

The maintenance window of the cluster. This feature is available only in ACK Pro clusters.

parametersobject

The Resource Orchestration Service (ROS) parameters of the cluster.

string

The ROS parameters.

WorkerImageId
operation_policyobject

The automatic O&M policy of the cluster.

cluster_auto_upgradeobject

The configurations of auto cluster update.

enabledboolean

Specifies whether to enable auto cluster update.

true
channelstring

The frequency of auto cluster updates. For more information, see Update frequency.

Valid values:

  • patch: specifies the latest patch version.
  • stable: specifies the second-latest minor version.
  • rapid: specifies the latest minor version.
patch

Examples

Sample success responses

JSONformat

{
  "cluster_id": "c82e6987e2961451182edacd74faf****",
  "cluster_type": "Kubernetes",
  "created": "2019-11-25T15:50:20+08:00",
  "init_version": "1.16.6-aliyun.1",
  "current_version": "1.16.6-aliyun.1",
  "next_version": "1.18.8-aliyun.1",
  "deletion_protection": true,
  "docker_version": "19.03.5",
  "external_loadbalancer_id": "lb-2zehc05z3b8dwiifh****",
  "meta_data": "\\\"Addons\\\":***",
  "name": "cluster-demo",
  "network_mode": "vpc",
  "region_id": "cn-beijing",
  "resource_group_id": "rg-acfmyvw3wjm****",
  "security_group_id": "sg-25yq****",
  "container_cidr": "172.20.0.0/16",
  "service_cidr": "172.21.0.0/20",
  "proxy_mode": "ipvs",
  "timezone": "Asia/Shanghai",
  "node_cidr_mask": "26",
  "ip_stack": "ipv4",
  "cluster_domain": "cluster.local",
  "size": 5,
  "state": "running",
  "tags": [
    {
      "key": "env",
      "value": "prod"
    }
  ],
  "updated": "2020-01-13T23:01:03+08:00",
  "vpc_id": "vpc-2zecuu62b9zw7a7qn****",
  "vswitch_id": "vsw-2zete8s4qocqg0mf6****,vsw-2zete8s4qocqg0mf6****",
  "vswitch_ids": [
    "vsw-2zete8s4qocqg0mf6****"
  ],
  "subnet_cidr": "172.20.0.0/16",
  "zone_id": "cn-beijing-a",
  "master_url": "{\\\"intranet_api_server_endpoint\\\":\\\"https://192.168.0.251:6443\\\"***}",
  "private_zone": false,
  "profile": "Default",
  "cluster_spec": "ack.pro.small",
  "worker_ram_role_name": "KubernetesWorkerRole-ec87d15b-edca-4302-933f-c8a16bf0****",
  "maintenance_window": {
    "enable": false,
    "maintenance_time": "03:00:00Z",
    "duration": "3h",
    "weekly_period": "Monday,Thursday",
    "recurrence": "FREQ=WEEKLY;INTERVAL=4;BYDAY=MO,TU"
  },
  "parameters": {
    "key": "WorkerImageId"
  },
  "operation_policy": {
    "cluster_auto_upgrade": {
      "enabled": true,
      "channel": "patch"
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-18The response structure of the API has changedView Change Details
2024-10-15The response structure of the API has changedView Change Details
2024-04-26The internal configuration of the API is changed, but the call is not affectedView Change Details