DescribeClusterCommand

Describes 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 Creating or updating a kubeconfig file for an Amazon EKS cluster .

The API server endpoint and certificate authority data aren't available until the cluster reaches the ACTIVE state.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EKSClient, DescribeClusterCommand } from "@aws-sdk/client-eks"; // ES Modules import
// const { EKSClient, DescribeClusterCommand } = require("@aws-sdk/client-eks"); // CommonJS import
const client = new EKSClient(config);
const input = { // DescribeClusterRequest
  name: "STRING_VALUE", // required
};
const command = new DescribeClusterCommand(input);
const response = await client.send(command);
// { // DescribeClusterResponse
//   cluster: { // Cluster
//     name: "STRING_VALUE",
//     arn: "STRING_VALUE",
//     createdAt: new Date("TIMESTAMP"),
//     version: "STRING_VALUE",
//     endpoint: "STRING_VALUE",
//     roleArn: "STRING_VALUE",
//     resourcesVpcConfig: { // VpcConfigResponse
//       subnetIds: [ // StringList
//         "STRING_VALUE",
//       ],
//       securityGroupIds: [
//         "STRING_VALUE",
//       ],
//       clusterSecurityGroupId: "STRING_VALUE",
//       vpcId: "STRING_VALUE",
//       endpointPublicAccess: true || false,
//       endpointPrivateAccess: true || false,
//       publicAccessCidrs: [
//         "STRING_VALUE",
//       ],
//     },
//     kubernetesNetworkConfig: { // KubernetesNetworkConfigResponse
//       serviceIpv4Cidr: "STRING_VALUE",
//       serviceIpv6Cidr: "STRING_VALUE",
//       ipFamily: "ipv4" || "ipv6",
//       elasticLoadBalancing: { // ElasticLoadBalancing
//         enabled: true || false,
//       },
//     },
//     logging: { // Logging
//       clusterLogging: [ // LogSetups
//         { // LogSetup
//           types: [ // LogTypes
//             "api" || "audit" || "authenticator" || "controllerManager" || "scheduler",
//           ],
//           enabled: true || false,
//         },
//       ],
//     },
//     identity: { // Identity
//       oidc: { // OIDC
//         issuer: "STRING_VALUE",
//       },
//     },
//     status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING" || "PENDING",
//     certificateAuthority: { // Certificate
//       data: "STRING_VALUE",
//     },
//     clientRequestToken: "STRING_VALUE",
//     platformVersion: "STRING_VALUE",
//     tags: { // TagMap
//       "<keys>": "STRING_VALUE",
//     },
//     encryptionConfig: [ // EncryptionConfigList
//       { // EncryptionConfig
//         resources: [
//           "STRING_VALUE",
//         ],
//         provider: { // Provider
//           keyArn: "STRING_VALUE",
//         },
//       },
//     ],
//     connectorConfig: { // ConnectorConfigResponse
//       activationId: "STRING_VALUE",
//       activationCode: "STRING_VALUE",
//       activationExpiry: new Date("TIMESTAMP"),
//       provider: "STRING_VALUE",
//       roleArn: "STRING_VALUE",
//     },
//     id: "STRING_VALUE",
//     health: { // ClusterHealth
//       issues: [ // ClusterIssueList
//         { // ClusterIssue
//           code: "AccessDenied" || "ClusterUnreachable" || "ConfigurationConflict" || "InternalFailure" || "ResourceLimitExceeded" || "ResourceNotFound" || "IamRoleNotFound" || "VpcNotFound" || "InsufficientFreeAddresses" || "Ec2ServiceNotSubscribed" || "Ec2SubnetNotFound" || "Ec2SecurityGroupNotFound" || "KmsGrantRevoked" || "KmsKeyNotFound" || "KmsKeyMarkedForDeletion" || "KmsKeyDisabled" || "StsRegionalEndpointDisabled" || "UnsupportedVersion" || "Other",
//           message: "STRING_VALUE",
//           resourceIds: "<StringList>",
//         },
//       ],
//     },
//     outpostConfig: { // OutpostConfigResponse
//       outpostArns: "<StringList>", // required
//       controlPlaneInstanceType: "STRING_VALUE", // required
//       controlPlanePlacement: { // ControlPlanePlacementResponse
//         groupName: "STRING_VALUE",
//       },
//     },
//     accessConfig: { // AccessConfigResponse
//       bootstrapClusterCreatorAdminPermissions: true || false,
//       authenticationMode: "API" || "API_AND_CONFIG_MAP" || "CONFIG_MAP",
//     },
//     upgradePolicy: { // UpgradePolicyResponse
//       supportType: "STANDARD" || "EXTENDED",
//     },
//     zonalShiftConfig: { // ZonalShiftConfigResponse
//       enabled: true || false,
//     },
//     remoteNetworkConfig: { // RemoteNetworkConfigResponse
//       remoteNodeNetworks: [ // RemoteNodeNetworkList
//         { // RemoteNodeNetwork
//           cidrs: "<StringList>",
//         },
//       ],
//       remotePodNetworks: [ // RemotePodNetworkList
//         { // RemotePodNetwork
//           cidrs: "<StringList>",
//         },
//       ],
//     },
//     computeConfig: { // ComputeConfigResponse
//       enabled: true || false,
//       nodePools: "<StringList>",
//       nodeRoleArn: "STRING_VALUE",
//     },
//     storageConfig: { // StorageConfigResponse
//       blockStorage: { // BlockStorage
//         enabled: true || false,
//       },
//     },
//   },
// };

Example Usage

 Loading code editor

DescribeClusterCommand Input

See DescribeClusterCommandInput for more details

Parameter
Type
Description
name
Required
string | undefined

The name of your cluster.

DescribeClusterCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
cluster
Cluster | undefined

The full description of your specified cluster.

Throws

Name
Fault
Details
ClientException
client

These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal  that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.

ResourceNotFoundException
client

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 Amazon Web Services Region specific.

ServerException
server

These errors are usually caused by a server-side issue.

ServiceUnavailableException
server

The service is unavailable. Back off and retry the operation.

EKSServiceException
Base exception class for all service exceptions from EKS service.