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
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| adcp:DescribeHubClusterKubeconfig | get | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ClusterId | string | Yes | The cluster ID. | c102fe5f1ee5d4c87a68121a77d8b**** |
| PrivateIpAddress | boolean | No | Specifies whether to obtain the kubeconfig file that is used to connect to the cluster over the internal network. Valid values:
Default value: | false |
Response parameters
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 time | Summary of changes | Operation |
|---|---|---|
| 2021-12-30 | Add Operation | View Change Details |
