DescribeCluster
Returns descriptive information about an Amazon EKS cluster.
The API server endpoint and certificate authority data returned by this operation
are
required for kubelet
and kubectl
to communicate with your
Kubernetes API server. For more information, see Create a
kubeconfig for Amazon EKS.
Note
The API server endpoint and certificate authority data aren't available until the
cluster reaches the ACTIVE
state.
Request Syntax
GET /clusters/
name
HTTP/1.1
URI Request Parameters
The request requires the following URI parameters.
- name
-
The name of the cluster to describe.
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200 Content-type: application/json { "cluster": { "arn": "string", "certificateAuthority": { "data": "string" }, "clientRequestToken": "string", "createdAt": number, "endpoint": "string", "identity": { "oidc": { "issuer": "string" } }, "logging": { "clusterLogging": [ { "enabled": boolean, "types": [ "string" ] } ] }, "name": "string", "platformVersion": "string", "resourcesVpcConfig": { "clusterSecurityGroupId": "string", "endpointPrivateAccess": boolean, "endpointPublicAccess": boolean, "securityGroupIds": [ "string" ], "subnetIds": [ "string" ], "vpcId": "string" }, "roleArn": "string", "status": "string", "tags": { "string" : "string" }, "version": "string" } }
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Errors.
- ClientException
-
These errors are usually caused by a client action. Actions can include using an action or resource on behalf of a user that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Region-specific.
HTTP Status Code: 404
- ServerException
-
These errors are usually caused by a server-side issue.
HTTP Status Code: 500
- ServiceUnavailableException
-
The service is unavailable. Back off and retry the operation.
HTTP Status Code: 503
Example
In the following example or examples, the Authorization header contents
(AUTHPARAMS
) must be replaced with an AWS Signature Version 4
signature. For more information about creating these signatures, see Signature
Version 4 Signing Process in the AWS General
Reference.
You need to learn how to sign HTTP requests only if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.
Example
The following example describes a cluster called
prod
.
Sample Request
GET /clusters/prod HTTP/1.1 Host: eks.us-west-2.amazonaws.com Accept-Encoding: identity User-Agent: aws-cli/1.16.120 Python/3.7.0 Darwin/18.2.0 botocore/1.12.110 X-Amz-Date: 20190322T161109Z Authorization: AUTHPARAMS
Sample Response
HTTP/1.1 200 OK Date: Fri, 22 Mar 2019 16:11:07 GMT Content-Type: application/json Content-Length: 682 x-amzn-RequestId: 1978fca5-4cbd-11e9-86ea-2b6dc519decd x-amz-apigw-id: W85cPGkVvHcFa4g= X-Amzn-Trace-Id: Root=1-5c95091b-6e7cd4882cd91834b66ac514 Connection: keep-alive { "cluster": { "name": "prod", "arn": "arn:aws:eks:us-west-2:012345678910:cluster/prod", "createdAt": 1553270518.433, "version": "1.11", "endpoint": null, "roleArn": "arn:aws:iam::012345678910:role/EksServiceRole", "resourcesVpcConfig": { "subnetIds": [ "subnet-077bc97efd5dae4f9", "subnet-0d6dc303cd69de702", "subnet-0b48c05c4cd1500cb" ], "securityGroupIds": [ "sg-089666e5ca892599f" ], "vpcId": "vpc-0405181d8db2f03ec", "endpointPublicAccess": true, "endpointPrivateAccess": true }, "logging": { "clusterLogging": [ { "types": [ "api", "audit", "authenticator", "controllerManager", "scheduler" ], "enabled": false } ] }, "identity": { "oidc": { "issuer": null } }, "status": "CREATING", "certificateAuthority": { "data": null }, "clientRequestToken": null, "platformVersion": "eks.2" } }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: