All Products
Search
Document Center

Container Service for Kubernetes:DescribeHubClusterKubeconfig

Last Updated:Sep 16, 2025

Queries the kubeconfig file of a Distributed Cloud Container Platform for Kubernetes (ACK One) cluster. In addition to the Container Service for Kubernetes (ACK) console, you can also use the Kubernetes CLI kubectl to manage clusters and applications. If you use kubectl to manage an ACK cluster, you must obtain the kubeconfig file of the cluster and use kubectl to connect to the cluster.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
adcp:DescribeHubClusterKubeconfigget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

c102fe5f1ee5d4c87a68121a77d8b****
PrivateIpAddressbooleanNo

Specifies whether to obtain the kubeconfig file that is used to connect to the cluster over the internal network. Valid values:

  • true: obtains the kubeconfig file that is used to connect to the master instance over the internal network.
  • false: obtains the kubeconfig file that is used to connect to the master instance over the Internet.

Default value: false

false

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

5BE4C329-DCC2-5B61-8F66-112B7D7FC712
Kubeconfigstring

The content of the kubeconfig file.

"\napiVersion: v1\nclusters:\n- cluster:\n server: https://172.16.11.***:6443\n certificate-authority-data: LS0tLS1CRU=...\n name: kubernetes\ncontexts:\n- context:\n cluster: kubernetes\n user: \"kubernetes-a****\"\n name: kubernetes-admin-cc2cbf5802bec4bfa9fae4014d8c****\ncurrent-context: kubernetes-admin-cc2cbf5802bec4bfa9fae4014d8c9****\nkind: Config\npreferences: {}\nusers:\n- name: \"kubernetes-admin\"\n user:\n client-certificate-data: LS0tLS1CRU...\n client-key-data: LS0tCg==...\n"

Examples

Sample success responses

JSONformat

{
  "RequestId": "5BE4C329-DCC2-5B61-8F66-112B7D7FC712",
  "Kubeconfig": "\napiVersion: v1\nclusters:\n- cluster:\n    server: https://172.16.11.***:6443\n    certificate-authority-data: LS0tLS1CRU=...\n  name: kubernetes\ncontexts:\n- context:\n    cluster: kubernetes\n    user: \"kubernetes-a****\"\n  name: kubernetes-admin-cc2cbf5802bec4bfa9fae4014d8c****\ncurrent-context: kubernetes-admin-cc2cbf5802bec4bfa9fae4014d8c9****\nkind: Config\npreferences: {}\nusers:\n- name: \"kubernetes-admin\"\n  user:\n    client-certificate-data: LS0tLS1CRU...\n    client-key-data: LS0tCg==...\n"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2021-12-30Add OperationView Change Details