You can call the DescribeExternalAgent operation to query the agent configurations of a registered cluster. You can deploy the agent configurations in an external cluster. This allows you to access the API server of the cluster.
For more information, see Register an external Kubernetes cluster.
Debugging
Request syntax
GET /k8s/ClusterId/external/agent/deployment?PrivateIpAddress=String HTTP/1.1
Content-Type:application/json
Request parameters
Request path parameters
Parameter |
Type |
Required |
Example |
Description |
ClusterId | String | Yes | c106f377e16f34eb1808d6b9362c9**** | The ID of the cluster that you want to query. |
Request query parameters
Parameter |
Type |
Required |
Example |
Description |
PrivateIpAddress | String | No | true | Specifies whether to obtain the credentials that are used to access the cluster over the internal network.
Default value: |
AgentMode | String | No | admin | The permission mode of the agent. Valid values: admin: the admin mode, which provides full permissions. restricted: the restricted mode, which provides partial permissions. Default value: admin. |
Response syntax
HTTP/1.1 200
Content-Type:application/json
{
"config" : "String"
}
Response parameters
Response body parameters
Parameter |
Type |
Example |
Description |
config | String | apiVersion: v1**** | The agent configurations in the YAML format. |
Examples
Sample requests
GET /k8s/c106f377e16f34eb1808d6b9362c9****/external/agent/deployment?PrivateIpAddress=true HTTP/1.1
Content-Type:application/json
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<config>apiVersion: v1****</config>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"config" : "apiVersion: v1****"
}
Error codes
For a list of error codes, see Service error codes.