Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idaws.eks.clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an Amazon EKS cluster on the Amazon Web Services cloud.
namestringThe name of your cluster.
access_configobjectThe access configuration for the cluster.
arnstringThe Amazon Resource Name (ARN) of the cluster.
certificate_authorityobjectThe certificate-authority-data for your cluster.
client_request_tokenstringA unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
compute_configobjectIndicates the current configuration of the compute capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the compute capability is enabled, EKS Auto Mode will create and delete EC2 Managed Instances in your Amazon Web Services account. For more information, see EKS Auto Mode compute capability in the Amazon EKS User Guide.
connector_configobjectThe configuration used to connect to a cluster for registration.
control_plane_scaling_configobjectThe control plane scaling tier configuration. For more information, see EKS Provisioned Control Plane in the Amazon EKS User Guide.
created_atstring (date-time)The Unix epoch timestamp at object creation.
deletion_protectionbooleanThe current deletion protection setting for the cluster. When true, deletion protection is enabled and the cluster cannot be deleted until protection is disabled. When false, the cluster can be deleted normally. This setting only applies to clusters in an active state.
encryption_configarrayThe encryption configuration for the cluster.
endpointstringThe endpoint for your Kubernetes API server.
healthobjectAn object representing the health of your Amazon EKS cluster.
identityobjectThe identity provider information for the cluster.
kube_api_server_configobjectThe Kubernetes API server configuration for the cluster.
kube_controller_manager_configobjectThe Kubernetes controller manager configuration for the cluster.
kube_scheduler_configobjectThe Kubernetes scheduler configuration for the cluster.
kubernetes_network_configobjectThe Kubernetes network configuration for the cluster.
loggingobjectAn object representing the logging configuration for resources in your cluster.
outpost_configobjectAn object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object isn't available for clusters on the Amazon Web Services cloud.
platform_versionstringThe platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web Services Cloud, see Platform versions in the Amazon EKS User Guide . For more information about local clusters deployed on an Outpost, see Amazon EKS local cluster platform versions in the Amazon EKS User Guide .
remote_network_configobjectThe configuration in the cluster for EKS Hybrid Nodes. You can add, change, or remove this configuration after the cluster is created.
resources_vpc_configobjectThe VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC considerations and Cluster security group considerations in the Amazon EKS User Guide.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to Amazon Web Services API operations on your behalf.
statusstringThe current status of the cluster. (CREATING, ACTIVE, DELETING, FAILED, UPDATING, PENDING)
storage_configobjectIndicates the current configuration of the block storage capability on your EKS Auto Mode cluster. For example, if the capability is enabled or disabled. If the block storage capability is enabled, EKS Auto Mode will create and delete EBS volumes in your Amazon Web Services account. For more information, see EKS Auto Mode block storage capability in the Amazon EKS User Guide.
tagsobjectMetadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
upgrade_policyobjectThis value indicates if extended support is enabled or disabled for the cluster. Learn more about EKS Extended Support in the Amazon EKS User Guide.
versionstringThe Kubernetes server version for the cluster.
zonal_shift_configobjectThe configuration for zonal shift for the cluster.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_clusterselectname, regionDescribes 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.
list_clustersselectregionmaxResults, nextToken, includeLists the Amazon EKS clusters in your Amazon Web Services account in the specified Amazon Web Services Region.
create_clusterinsertregion, name, roleArn, resourcesVpcConfigCreates an Amazon EKS control plane. The Amazon EKS control plane consists of control plane instances that run the Kubernetes software, such as etcd and the API server. The control plane runs in an account managed by Amazon Web Services, and the Kubernetes API is exposed by the Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is single tenant and unique. It runs on its own set of Amazon EC2 instances. The cluster control plane is provisioned across multiple Availability Zones and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC subnets to provide connectivity from the control plane instances to the nodes (for example, to support kubectl exec, logs, and proxy data flows). Amazon EKS nodes run in your Amazon Web Services account and connect to your cluster's control plane over the Kubernetes API server endpoint and a certificate file that is created for your cluster. You can use the endpointPublicAccess and endpointPrivateAccess parameters to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. The endpoint domain name and IP address family depends on the value of the ipFamily for the cluster. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide . You can use the logging parameter to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide . CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing. In most cases, it takes several minutes to create a cluster. After you create an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate with the API server and launch nodes into your cluster. For more information, see Allowing users to access your cluster and Launching Amazon EKS nodes in the Amazon EKS User Guide.
register_clusterinsertregion, name, connectorConfigConnects a Kubernetes cluster to the Amazon EKS control plane. Any Kubernetes cluster can be connected to the Amazon EKS control plane to view current information about the cluster and its nodes. Cluster connection requires two steps. First, send a RegisterClusterRequest to add it to the Amazon EKS control plane. Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility. After the manifest is updated and applied, the connected cluster is visible to the Amazon EKS control plane. If the manifest isn't applied within three days, the connected cluster will no longer be visible and must be deregistered using DeregisterCluster.
update_cluster_configupdatename, regionUpdates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with DescribeUpdate. You can use this operation to do the following actions: You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control plane logs in the Amazon EKS User Guide . CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing. You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see Cluster API server endpoint in the Amazon EKS User Guide . You can also use this API operation to choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can't change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see https:​//docs.aws.amazon.com/eks/latest/userguide/network_reqs.html in the Amazon EKS User Guide . You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster. You can also use this API operation to add, change, or remove the configuration in the cluster for EKS Hybrid Nodes. To remove the configuration, use the remoteNetworkConfig key with an object containing both subkeys with empty arrays for each. Here is an inline example: "remoteNetworkConfig": { "remoteNodeNetworks": [], "remotePodNetworks": [] }. Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful), the cluster status moves to Active.
delete_clusterdeletename, regionDeletes an Amazon EKS cluster control plane. If you have active services and ingress resources in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a cluster in the Amazon EKS User Guide. If you have managed node groups or Fargate profiles attached to the cluster, you must delete them first. For more information, see DeleteNodgroup and DeleteFargateProfile.
deregister_clusterexecname, regionDeregisters a connected cluster to remove it from the Amazon EKS control plane. A connected cluster is a Kubernetes cluster that you've connected to your control plane using the Amazon EKS Connector.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the connected cluster to deregister.
regionstringAWS region (default: us-east-1)
includearrayIndicates whether external clusters are included in the returned list. Use 'all' to return https:​//docs.aws.amazon.com/eks/latest/userguide/eks-connector.htmlconnected clusters, or blank to return only Amazon EKS clusters. 'all' must be in lowercase otherwise an error occurs.
maxResultsintegerThe maximum number of results, returned in paginated output. You receive maxResults in a single page, along with a nextToken response element. You can see the remaining results of the initial request by sending another request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken value, if applicable, are returned.
nextTokenstringThe nextToken value returned from a previous paginated request, where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

SELECT examples

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.

SELECT
id,
name,
access_config,
arn,
certificate_authority,
client_request_token,
compute_config,
connector_config,
control_plane_scaling_config,
created_at,
deletion_protection,
encryption_config,
endpoint,
health,
identity,
kube_api_server_config,
kube_controller_manager_config,
kube_scheduler_config,
kubernetes_network_config,
logging,
outpost_config,
platform_version,
remote_network_config,
resources_vpc_config,
role_arn,
status,
storage_config,
tags,
upgrade_policy,
version,
zonal_shift_config
FROM aws.eks.clusters
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon EKS control plane. The Amazon EKS control plane consists of control plane instances that run the Kubernetes software, such as etcd and the API server. The control plane runs in an account managed by Amazon Web Services, and the Kubernetes API is exposed by the Amazon EKS API server endpoint. Each Amazon EKS cluster control plane is single tenant and unique. It runs on its own set of Amazon EC2 instances. The cluster control plane is provisioned across multiple Availability Zones and fronted by an Elastic Load Balancing Network Load Balancer. Amazon EKS also provisions elastic network interfaces in your VPC subnets to provide connectivity from the control plane instances to the nodes (for example, to support kubectl exec, logs, and proxy data flows). Amazon EKS nodes run in your Amazon Web Services account and connect to your cluster's control plane over the Kubernetes API server endpoint and a certificate file that is created for your cluster. You can use the endpointPublicAccess and endpointPrivateAccess parameters to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. The endpoint domain name and IP address family depends on the value of the ipFamily for the cluster. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide . You can use the logging parameter to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide . CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing. In most cases, it takes several minutes to create a cluster. After you create an Amazon EKS cluster, you must configure your Kubernetes tooling to communicate with the API server and launch nodes into your cluster. For more information, see Allowing users to access your cluster and Launching Amazon EKS nodes in the Amazon EKS User Guide.

INSERT INTO aws.eks.clusters (
name,
version,
roleArn,
resourcesVpcConfig,
kubernetesNetworkConfig,
logging,
clientRequestToken,
tags,
encryptionConfig,
outpostConfig,
accessConfig,
bootstrapSelfManagedAddons,
upgradePolicy,
zonalShiftConfig,
remoteNetworkConfig,
computeConfig,
storageConfig,
deletionProtection,
controlPlaneScalingConfig,
kubeApiServerConfig,
kubeSchedulerConfig,
kubeControllerManagerConfig,
region
)
SELECT
'{{ name }}' /* required */,
'{{ version }}',
'{{ roleArn }}' /* required */,
'{{ resourcesVpcConfig }}' /* required */,
'{{ kubernetesNetworkConfig }}',
'{{ logging }}',
'{{ clientRequestToken }}',
'{{ tags }}',
'{{ encryptionConfig }}',
'{{ outpostConfig }}',
'{{ accessConfig }}',
{{ bootstrapSelfManagedAddons }},
'{{ upgradePolicy }}',
'{{ zonalShiftConfig }}',
'{{ remoteNetworkConfig }}',
'{{ computeConfig }}',
'{{ storageConfig }}',
{{ deletionProtection }},
'{{ controlPlaneScalingConfig }}',
'{{ kubeApiServerConfig }}',
'{{ kubeSchedulerConfig }}',
'{{ kubeControllerManagerConfig }}',
'{{ region }}'
RETURNING
cluster
;

UPDATE examples

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the update. The response output includes an update ID that you can use to track the status of your cluster update with DescribeUpdate. You can use this operation to do the following actions: You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster control plane logs in the Amazon EKS User Guide . CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported control plane logs. For more information, see CloudWatch Pricing. You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see Cluster API server endpoint in the Amazon EKS User Guide . You can also use this API operation to choose different subnets and security groups for the cluster. You must specify at least two subnets that are in different Availability Zones. You can't change which VPC the subnets are from, the subnets must be in the same VPC as the subnets that the cluster was created with. For more information about the VPC requirements, see https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html in the Amazon EKS User Guide . You can also use this API operation to enable or disable ARC zonal shift. If zonal shift is enabled, Amazon Web Services configures zonal autoshift for the cluster. You can also use this API operation to add, change, or remove the configuration in the cluster for EKS Hybrid Nodes. To remove the configuration, use the remoteNetworkConfig key with an object containing both subkeys with empty arrays for each. Here is an inline example: "remoteNetworkConfig": { "remoteNodeNetworks": [], "remotePodNetworks": [] }. Cluster updates are asynchronous, and they should finish within a few minutes. During an update, the cluster status moves to UPDATING (this status transition is eventually consistent). When the update is complete (either Failed or Successful), the cluster status moves to Active.

UPDATE aws.eks.clusters
SET
resourcesVpcConfig = '{{ resourcesVpcConfig }}',
logging = '{{ logging }}',
clientRequestToken = '{{ clientRequestToken }}',
accessConfig = '{{ accessConfig }}',
upgradePolicy = '{{ upgradePolicy }}',
zonalShiftConfig = '{{ zonalShiftConfig }}',
computeConfig = '{{ computeConfig }}',
kubernetesNetworkConfig = '{{ kubernetesNetworkConfig }}',
storageConfig = '{{ storageConfig }}',
remoteNetworkConfig = '{{ remoteNetworkConfig }}',
deletionProtection = {{ deletionProtection }},
controlPlaneScalingConfig = '{{ controlPlaneScalingConfig }}',
kubeApiServerConfig = '{{ kubeApiServerConfig }}',
kubeSchedulerConfig = '{{ kubeSchedulerConfig }}',
kubeControllerManagerConfig = '{{ kubeControllerManagerConfig }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
RETURNING
update;

DELETE examples

Deletes an Amazon EKS cluster control plane. If you have active services and ingress resources in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a cluster in the Amazon EKS User Guide. If you have managed node groups or Fargate profiles attached to the cluster, you must delete them first. For more information, see DeleteNodgroup and DeleteFargateProfile.

DELETE FROM aws.eks.clusters
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Deregisters a connected cluster to remove it from the Amazon EKS control plane. A connected cluster is a Kubernetes cluster that you've connected to your control plane using the Amazon EKS Connector.

EXEC aws.eks.clusters.deregister_cluster
@name='{{ name }}' --required,
@region='{{ region }}' --required
;