All Products
Search
Document Center

Enterprise Distributed Application Service:GetK8sCluster

Last Updated:Dec 22, 2025

Gets a list of Container Service for Kubernetes (ACK) clusters or Serverless Kubernetes (ASK) clusters.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

edas:ReadCluster

get

*Cluster

acs:edas:{#regionId}:{#accountId}:namespace/{#NameSpaceId}/cluster/{#ClusterId}

None None

Request syntax

POST /pop/v5/k8s_clusters HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionTag

string

Yes

The region.

cn-hangzhou

CurrentPage

integer

No

The number of the page to return for a paged query. The default value is 1.

1

PageSize

integer

No

The number of entries to return on each page for a paged query. The default value is 1000.

10

ClusterType

integer

No

The type of the Kubernetes cluster:

  • 5: an ACK cluster.

  • 7: a self-managed Kubernetes cluster.

5

SubClusterType

string

No

The subtype of the cluster:

  • Ask: an ASK cluster.

  • ManagedKubernetes: an ACK cluster.

Ask

Response elements

Element

Type

Description

Example

object

The response from the call.

Code

integer

The status of the call or a POP error code.

200

Message

string

The additional information.

success

RequestId

string

The request ID.

C3CE915C-0C83-4AA5-8D66-E8BEED62939E

ClusterPage

object

The paginated list of clusters.

CurrentPage

integer

The number of the returned page. The default value is 1.

1

PageSize

integer

The number of entries returned per page. The default value is 1000.

10

TotalSize

integer

The total number of pages.

5

ClusterList

object

Cluster

array<object>

The list of clusters.

object

A cluster object.

VpcId

string

The ID of the VPC.

vpc-**z1mlwpbjx3e9m**

VswitchId

string

The ID of the vSwitch.

vsw-bp1uf97****xjxgip****

SubNetCidr

string

The CIDR block of the subnet.

172.20.0.0/16

Mem

integer

The total amount of memory. Unit: MB.

2048

RegionId

string

The ID of the region.

test

CsClusterStatus

string

The running status of the container cluster:

  • initial: The cluster is being initialized.

  • failed: The cluster failed to be created.

  • running: The cluster is running.

  • updating: The cluster is being updated.

  • scaling: The cluster is being scaled out.

  • removing: Nodes are being removed from the cluster.

  • upgrading: The cluster is being upgraded.

  • deleting: The cluster is being deleted.

  • delete_failed: The cluster failed to be deleted.

  • deleted: The cluster is deleted. This status is not visible to users.

running

Cpu

integer

The total number of CPU cores.

4

NetworkMode

integer

The network type:

  • 1: classic network.

  • 2: VPC.

2

CsClusterId

string

The ID of the Container Service cluster.

2ce62869f4d4466b920312315f05****

Description

string

The description of the cluster.

test

ClusterType

integer

The type of the cluster:

  • 2: ECS cluster.

  • 5: ACK cluster or ASK cluster.

5

ClusterName

string

The name of the cluster.

test

NodeNum

integer

The number of nodes.

4

ClusterId

string

The ID of the cluster.

81453e4b-4df0-4592-****-b835a2ee****

ClusterImportStatus

integer

The import status of the cluster:

  • 0: The cluster is not imported.

  • 1: The cluster is imported.

  • 2: The cluster failed to be imported.

  • 3: The cluster is being imported.

  • 4: The cluster is deleted.

1

SubClusterType

string

The subtype of the cluster:

  • Ask: an ASK cluster.

  • ManagedKubernetes: an ACK cluster.

Ask

ClusterStatus

integer

The running status of the cluster:

  • 1: Normal.

  • 2: Abnormal.

  • 3: Offline.

1

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "success",
  "RequestId": "C3CE915C-0C83-4AA5-8D66-E8BEED62939E",
  "ClusterPage": {
    "CurrentPage": 1,
    "PageSize": 10,
    "TotalSize": 5,
    "ClusterList": {
      "Cluster": [
        {
          "VpcId": "vpc-**z1mlwpbjx3e9m**",
          "VswitchId": "vsw-bp1uf97****xjxgip****",
          "SubNetCidr": "172.20.0.0/16",
          "Mem": 2048,
          "RegionId": "test",
          "CsClusterStatus": "running",
          "Cpu": 4,
          "NetworkMode": 2,
          "CsClusterId": "2ce62869f4d4466b920312315f05****",
          "Description": "test",
          "ClusterType": 5,
          "ClusterName": "test",
          "NodeNum": 4,
          "ClusterId": "81453e4b-4df0-4592-****-b835a2ee****",
          "ClusterImportStatus": 1,
          "SubClusterType": "Ask",
          "ClusterStatus": 1
        }
      ]
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

500 Edas.errorcode.PermissionDenied.message You are not authorized to perform the operation. No permissions

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.