Amazon EKS examples using AWS CLI - AWS Command Line Interface
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Amazon EKS examples using AWS CLI

The following code examples show you how to perform actions and implement common scenarios by using the AWS Command Line Interface with Amazon EKS.

Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.

Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.

Topics

Actions

The following code example shows how to use associate-access-policy.

AWS CLI

To associate an access policy and its scope to the access entry of the cluster

The following associate-access-policy example associates an access policy and its scope to the access entry of the specified cluster.

aws eks associate-access-policy \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/Admin \ --policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy \ --access-scope type=namespace,namespaces=default

Output:

{ "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:role/Admin", "associatedAccessPolicy": { "policyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy", "accessScope": { "type": "namespace", "namespaces": [ "default" ] }, "associatedAt": "2025-05-24T15:59:51.981000-05:00", "modifiedAt": "2025-05-24T15:59:51.981000-05:00" } }

For more information, see Associate access policies with access entries in the Amazon EKS User Guide.

The following code example shows how to use associate-encryption-config.

AWS CLI

To associates an encryption configuration to an existing cluster

The following associate-encryption-config example enable's encryption on an existing EKS clusters that do not already have encryption enabled.

aws eks associate-encryption-config \ --cluster-name my-eks-cluster \ --encryption-config '[{"resources":["secrets"],"provider":{"keyArn":"arn:aws:kms:region-code:account:key/key"}}]'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "AssociateEncryptionConfig", "params": [ { "type": "EncryptionConfig", "value": "[{\"resources\":[\"secrets\"],\"provider\":{\"keyArn\":\"arn:aws:kms:region-code:account:key/key\"}}]" } ], "createdAt": "2024-03-14T11:01:26.297000-04:00", "errors": [] } }

For more information, see Enabling secret encryption on an existing cluster in the Amazon EKS User Guide.

The following code example shows how to use associate-identity-provider-config.

AWS CLI

To associate an identity provider with your Amazon EKS cluster

The following associate-identity-provider-config example associates an identity provider to your Amazon EKS Cluster.

aws eks associate-identity-provider-config \ --cluster-name my-eks-cluster \ --oidc 'identityProviderConfigName=my-identity-provider,issuerUrl=https://oidc.eks.us-west-2.amazonaws.com/id/38D6A4619A0A69E342B113ED7F1A7652,clientId=kubernetes,usernameClaim=email,usernamePrefix=my-username-prefix,groupsClaim=my-claim,groupsPrefix=my-groups-prefix,requiredClaims={Claim1=value1,Claim2=value2}' \ --tags env=dev

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "AssociateIdentityProviderConfig", "params": [ { "type": "IdentityProviderConfig", "value": "[{\"type\":\"oidc\",\"name\":\"my-identity-provider\"}]" } ], "createdAt": "2024-04-11T13:46:49.648000-04:00", "errors": [] }, "tags": { "env": "dev" } }

For more information, see Authenticate users for your cluster from an OpenID Connect identity provider - Associate an OIDC identity provider in the Amazon EKS User Guide.

The following code example shows how to use create-access-entry.

AWS CLI

Example 1: To create the access entry for EKS cluster

The following create-access-entry example creates an access entry that allows an IAM principal to access the EKS cluster.

aws eks create-access-entry \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:user/eks-user

Output:

{ "accessEntry": { "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:user/eks-user", "kubernetesGroups": [], "accessEntryArn": "arn:aws:eks:us-west-2:123456789012:access-entry/eks-customer/user/123456789012/eks-user/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2025-04-14T22:45:48.097000-05:00", "modifiedAt": "2025-04-14T22:45:48.097000-05:00", "tags": {}, "username": "arn:aws:iam::123456789012:user/eks-user", "type": "STANDARD" } }

For more information, see Create access entries in the Amazon EKS User Guide.

Example 2: To create the access entry for EKS cluster by specifying the type of access entry

The following create-access-entry example creates an access entry of type EC2_LINUX in the EKS cluster. By default, a type STANDARD access entry is created. Apart from the default, if we specify any other access entry types, an IAM role ARN needs to be passed in the CLI.

aws eks create-access-entry \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/admin-test-ip \ --type EC2_LINUX

Output:

{ "accessEntry": { "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:role/admin-test-ip", "kubernetesGroups": [ "system:nodes" ], "accessEntryArn": "arn:aws:eks:us-west-2:123456789012:access-entry/eks-customer/role/123456789012/admin-test-ip/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "createdAt": "2025-05-06T19:42:45.453000-05:00", "modifiedAt": "2025-05-06T19:42:45.453000-05:00", "tags": {}, "username": "system:node:{{EC2PrivateDNSName}}", "type": "EC2_LINUX" } }

For more information, see Create access entries in the Amazon EKS User Guide.

The following code example shows how to use create-addon.

AWS CLI

Example 1: To create an Amazon EKS add-on with default compatible version for the respective EKS cluster version

The following create-addon example command creates an Amazon EKS add-on with default compatible version for the respective EKS cluster version.

aws eks create-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --service-account-role-arn arn:aws:iam::123456789012:role/role-name

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "CREATING", "addonVersion": "v1.15.1-eksbuild.1", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2024-03-14T12:20:03.264000-04:00", "modifiedAt": "2024-03-14T12:20:03.283000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": {} } }

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 2: To create an Amazon EKS add-on with specific add-on version

The following create-addon example command creates an Amazon EKS add-on with specific add-on version.

aws eks create-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --service-account-role-arn arn:aws:iam::123456789012:role/role-name \ --addon-version v1.16.4-eksbuild.2

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "CREATING", "addonVersion": "v1.16.4-eksbuild.2", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "createdAt": "2024-03-14T12:30:24.507000-04:00", "modifiedAt": "2024-03-14T12:30:24.521000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": {} } }

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 3: To create an Amazon EKS add-on with custom configuration values and resolve conflicts details

The following create-addon example command creates an Amazon EKS add-on with custom configuration values and resolves conflicts details.

aws eks create-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --service-account-role-arn arn:aws:iam::123456789012:role/role-name \ --addon-version v1.16.4-eksbuild.2 \ --configuration-values '{"resources":{"limits":{"cpu":"100m"}}}' \ --resolve-conflicts OVERWRITE

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "CREATING", "addonVersion": "v1.16.4-eksbuild.2", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "createdAt": "2024-03-14T12:35:58.313000-04:00", "modifiedAt": "2024-03-14T12:35:58.327000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": {}, "configurationValues": "{\"resources\":{\"limits\":{\"cpu\":\"100m\"}}}" } }

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 4: To create an Amazon EKS add-on with custom JSON configuration values file

The following create-addon example command creates an Amazon EKS add-on with custom configuration values and resolve conflicts details.

aws eks create-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --service-account-role-arn arn:aws:iam::123456789012:role/role-name \ --addon-version v1.16.4-eksbuild.2 \ --configuration-values 'file://configuration-values.json' \ --resolve-conflicts OVERWRITE \ --tags '{"eks-addon-key-1": "value-1" , "eks-addon-key-2": "value-2"}'

Contents of configuration-values.json:

{ "resources": { "limits": { "cpu": "150m" } }, "env": { "AWS_VPC_K8S_CNI_LOGLEVEL": "ERROR" } }

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "CREATING", "addonVersion": "v1.16.4-eksbuild.2", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "createdAt": "2024-03-14T13:10:51.763000-04:00", "modifiedAt": "2024-03-14T13:10:51.777000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": { "eks-addon-key-1": "value-1", "eks-addon-key-2": "value-2" }, "configurationValues": "{\n \"resources\": {\n \"limits\": {\n \"cpu\": \"150m\"\n }\n },\n \"env\": {\n \"AWS_VPC_K8S_CNI_LOGLEVEL\": \"ERROR\"\n }\n}" } }

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 5: To create an Amazon EKS add-on with custom YAML configuration values file

The following create-addon example command creates an Amazon EKS add-on with custom configuration values and resolve conflicts details.

aws eks create-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --service-account-role-arn arn:aws:iam::123456789012:role/role-name \ --addon-version v1.16.4-eksbuild.2 \ --configuration-values 'file://configuration-values.yaml' \ --resolve-conflicts OVERWRITE \ --tags '{"eks-addon-key-1": "value-1" , "eks-addon-key-2": "value-2"}'

Contents of configuration-values.yaml:

resources: limits: cpu: '100m' env: AWS_VPC_K8S_CNI_LOGLEVEL: 'DEBUG'

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "CREATING", "addonVersion": "v1.16.4-eksbuild.2", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE55555", "createdAt": "2024-03-14T13:15:45.220000-04:00", "modifiedAt": "2024-03-14T13:15:45.237000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": { "eks-addon-key-3": "value-3", "eks-addon-key-4": "value-4" }, "configurationValues": "resources:\n limits:\n cpu: '100m'\nenv:\n AWS_VPC_K8S_CNI_LOGLEVEL: 'INFO'" } }

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

  • For API details, see CreateAddon in AWS CLI Command Reference.

The following code example shows how to use create-cluster.

AWS CLI

Example 1: To create a new cluster

The following create-cluster example creates a cluster named prod in your default region.

aws eks create-cluster \ --name prod \ --role-arn arn:aws:iam::123456789012:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI \ --resources-vpc-config subnetIds=subnet-6782e71e,subnet-e7e761ac,securityGroupIds=sg-6979fe18

Output:

{ "cluster": { "name": "prod", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/prod", "createdAt": 1527808069.147, "version": "1.10", "roleArn": "arn:aws:iam::123456789012:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI", "resourcesVpcConfig": { "subnetIds": [ "subnet-6782e71e", "subnet-e7e761ac" ], "securityGroupIds": [ "sg-6979fe18" ], "vpcId": "vpc-950809ec" }, "status": "CREATING", "certificateAuthority": {} } }

For more information, see Create an Amazon EKS cluster in the Amazon EKS User Guide.

Example 2: To create a new cluster with private endpoint access and logging enabled

The following create-cluster example creates a cluster named example in your default region with public endpoint access disabled, private endpoint access enabled, and all logging types enabled.

aws eks create-cluster \ --name example \ --kubernetes-version 1.12 \ --role-arn arn:aws:iam::123456789012:role/example-cluster-ServiceRole-1XWBQWYSFRE2Q \ --resources-vpc-config subnetIds=subnet-0a188dccd2f9a632f,subnet-09290d93da4278664,subnet-0f21dd86e0e91134a,subnet-0173dead68481a583,subnet-051f70a57ed6fcab6,subnet-01322339c5c7de9b4,securityGroupIds=sg-0c5b580845a031c10,endpointPublicAccess=false,endpointPrivateAccess=true \ --logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}'

Output:

{ "cluster": { "name": "example", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/example", "createdAt": 1565804921.901, "version": "1.12", "roleArn": "arn:aws:iam::123456789012:role/example-cluster-ServiceRole-1XWBQWYSFRE2Q", "resourcesVpcConfig": { "subnetIds": [ "subnet-0a188dccd2f9a632f", "subnet-09290d93da4278664", "subnet-0f21dd86e0e91134a", "subnet-0173dead68481a583", "subnet-051f70a57ed6fcab6", "subnet-01322339c5c7de9b4" ], "securityGroupIds": [ "sg-0c5b580845a031c10" ], "vpcId": "vpc-0f622c01f68d4afec", "endpointPublicAccess": false, "endpointPrivateAccess": true }, "logging": { "clusterLogging": [ { "types": [ "api", "audit", "authenticator", "controllerManager", "scheduler" ], "enabled": true } ] }, "status": "CREATING", "certificateAuthority": {}, "platformVersion": "eks.3" } }

For more information, see Create an Amazon EKS cluster in the Amazon EKS User Guide.

  • For API details, see CreateCluster in AWS CLI Command Reference.

The following code example shows how to use create-fargate-profile.

AWS CLI

Example 1: To create an EKS Fargate profile for a selector with a namespace

The following create-fargate-profile example creates an EKS Fargate Profile for a selector with a namespace.

aws eks create-fargate-profile \ --cluster-name my-eks-cluster \ --pod-execution-role-arn arn:aws:iam::123456789012:role/role-name \ --fargate-profile-name my-fargate-profile \ --selectors '[{"namespace": "default"}]'

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T12:38:47.368000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default" } ], "status": "CREATING", "tags": {} } }

For more information, see AWS Fargate profile - Creating a Fargate profile in the Amazon EKS User Guide.

Example 2: To create an EKS Fargate profile for a selector with a namespace and labels

The following create-fargate-profile example creates an EKS Fargate Profile for a selector with a namespace and labels.

aws eks create-fargate-profile \ --cluster-name my-eks-cluster \ --pod-execution-role-arn arn:aws:iam::123456789012:role/role-name \ --fargate-profile-name my-fargate-profile \ --selectors '[{"namespace": "default", "labels": {"labelname1": "labelvalue1"}}]'

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T12:33:48.125000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default", "labels": { "labelname1": "labelvalue1" } } ], "status": "CREATING", "tags": {} } }

For more information, see AWS Fargate profile - Creating a Fargate profile in the Amazon EKS User Guide.

Example 3: To create an EKS Fargate profile for a selector with a namespace and labels, along with IDs of subnets to launch a Pod into

The following create-fargate-profile example create EKS Fargate Profile for a selector with a namespace and labels, along with IDs of subnets to launch a Pod into.

aws eks create-fargate-profile \ --cluster-name my-eks-cluster \ --pod-execution-role-arn arn:aws:iam::123456789012:role/role-name \ --fargate-profile-name my-fargate-profile \ --selectors '[{"namespace": "default", "labels": {"labelname1": "labelvalue1"}}]' \ --subnets '["subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72"]'

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T12:35:58.640000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default", "labels": { "labelname1": "labelvalue1" } } ], "status": "CREATING", "tags": {} } }

For more information, see AWS Fargate profile - Creating a Fargate profile in the Amazon EKS User Guide.

Example 4: To create an EKS Fargate profile for a selector with multiple namespaces and labels, along with IDs of subnets to launch a Pod into

The following create-fargate-profile example creates an EKS Fargate Profile for a selector with multiple namespace and labels, along with IDs of subnets to launch a Pod into.

aws eks create-fargate-profile \ --cluster-name my-eks-cluster \ --pod-execution-role-arn arn:aws:iam::123456789012:role/role-name \ --fargate-profile-name my-fargate-profile \ --selectors '[{"namespace": "default1", "labels": {"labelname1": "labelvalue1", "labelname2": "labelvalue2"}}, {"namespace": "default2", "labels": {"labelname1": "labelvalue1", "labelname2": "labelvalue2"}}]' \ --subnets '["subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72"]' \ --tags '{"eks-fargate-profile-key-1": "value-1" , "eks-fargate-profile-key-2": "value-2"}'

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T12:15:55.271000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default1", "labels": { "labelname2": "labelvalue2", "labelname1": "labelvalue1" } }, { "namespace": "default2", "labels": { "labelname2": "labelvalue2", "labelname1": "labelvalue1" } } ], "status": "CREATING", "tags": { "eks-fargate-profile-key-2": "value-2", "eks-fargate-profile-key-1": "value-1" } } }

For more information, see AWS Fargate profile - Creating a Fargate profile in the Amazon EKS User Guide.

Example 5: To create an EKS Fargate profile with a wildcard selector for namespaces and labels, along with IDs of subnets to launch a Pod into

The following create-fargate-profile example creates an EKS Fargate Profile for a selector with multiple namespace and labels, along with IDs of subnets to launch a Pod into.

aws eks create-fargate-profile \ --cluster-name my-eks-cluster \ --pod-execution-role-arn arn:aws:iam::123456789012:role/role-name \ --fargate-profile-name my-fargate-profile \ --selectors '[{"namespace": "prod*", "labels": {"labelname*?": "*value1"}}, {"namespace": "*dev*", "labels": {"labelname*?": "*value*"}}]' \ --subnets '["subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72"]' \ --tags '{"eks-fargate-profile-key-1": "value-1" , "eks-fargate-profile-key-2": "value-2"}'

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE55555", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T13:05:20.550000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "prod*", "labels": { "labelname*?": "*value1" } }, { "namespace": "*dev*", "labels": { "labelname*?": "*value*" } } ], "status": "CREATING", "tags": { "eks-fargate-profile-key-2": "value-2", "eks-fargate-profile-key-1": "value-1" } } }

For more information, see AWS Fargate profile - Creating a Fargate profile in the Amazon EKS User Guide.

The following code example shows how to use create-nodegroup.

AWS CLI

Example 1: To create a managed node group for an Amazon EKS cluster

The following create-nodegroup example creates a managed node group for an Amazon EKS cluster.

aws eks create-nodegroup \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --node-role arn:aws:iam::123456789012:role/role-name \ --subnets "subnet-0e2907431c9988b72" "subnet-04ad87f71c6e5ab4d" "subnet-09d912bb63ef21b9a" \ --scaling-config minSize=1,maxSize=3,desiredSize=1

Output:

{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-nodegroup/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-04T13:19:32.260000-04:00", "modifiedAt": "2024-04-04T13:19:32.260000-04:00", "status": "CREATING", "capacityType": "ON_DEMAND", "scalingConfig": { "minSize": 1, "maxSize": 3, "desiredSize": 1 }, "instanceTypes": [ "t3.medium" ], "subnets": [ "subnet-0e2907431c9988b72, subnet-04ad87f71c6e5ab4d, subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::123456789012:role/role-name", "diskSize": 20, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 1 }, "tags": {} } }

For more information, see Creating a managed node group in the Amazon EKS User Guide.

Example 2: To create a managed node group for an Amazon EKS cluster with custom instance-types and disk-size

The following create-nodegroup example creates a managed node group for an Amazon EKS cluster with custom instance-types and disk-size.

aws eks create-nodegroup \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --node-role arn:aws:iam::123456789012:role/role-name \ --subnets "subnet-0e2907431c9988b72" "subnet-04ad87f71c6e5ab4d" "subnet-09d912bb63ef21b9a" \ --scaling-config minSize=1,maxSize=3,desiredSize=1 \ --capacity-type ON_DEMAND \ --instance-types 'm5.large' \ --disk-size 50

Output:

{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-nodegroup/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-04T13:46:07.595000-04:00", "modifiedAt": "2024-04-04T13:46:07.595000-04:00", "status": "CREATING", "capacityType": "ON_DEMAND", "scalingConfig": { "minSize": 1, "maxSize": 3, "desiredSize": 1 }, "instanceTypes": [ "m5.large" ], "subnets": [ "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::123456789012:role/role-name", "diskSize": 50, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 1 }, "tags": {} } }

For more information, see Creating a managed node group in the Amazon EKS User Guide.

Example 3: To create a managed node group for an Amazon EKS cluster with custom instance-types, disk-size, ami-type, capacity-type, update-config, labels, taints and tags

The following create-nodegroup example creates a managed node group for an Amazon EKS cluster with custom instance-types, disk-size, ami-type, capacity-type, update-config, labels, taints and tags.

aws eks create-nodegroup \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --node-role arn:aws:iam::123456789012:role/role-name \ --subnets "subnet-0e2907431c9988b72" "subnet-04ad87f71c6e5ab4d" "subnet-09d912bb63ef21b9a" \ --scaling-config minSize=1,maxSize=5,desiredSize=4 \ --instance-types 't3.large' \ --disk-size 50 \ --ami-type AL2_x86_64 \ --capacity-type SPOT \ --update-config maxUnavailable=2 \ --labels '{"my-eks-nodegroup-label-1": "value-1" , "my-eks-nodegroup-label-2": "value-2"}' \ --taints '{"key": "taint-key-1" , "value": "taint-value-1", "effect": "NO_EXECUTE"}' \ --tags '{"my-eks-nodegroup-key-1": "value-1" , "my-eks-nodegroup-key-2": "value-2"}'

Output:

{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-nodegroup/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-04T14:05:07.940000-04:00", "modifiedAt": "2024-04-04T14:05:07.940000-04:00", "status": "CREATING", "capacityType": "SPOT", "scalingConfig": { "minSize": 1, "maxSize": 5, "desiredSize": 4 }, "instanceTypes": [ "t3.large" ], "subnets": [ "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::123456789012:role/role-name", "labels": { "my-eks-nodegroup-label-2": "value-2", "my-eks-nodegroup-label-1": "value-1" }, "taints": [ { "key": "taint-key-1", "value": "taint-value-1", "effect": "NO_EXECUTE" } ], "diskSize": 50, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 2 }, "tags": { "my-eks-nodegroup-key-1": "value-1", "my-eks-nodegroup-key-2": "value-2" } } }

For more information, see Creating a managed node group in the Amazon EKS User Guide.

The following code example shows how to use create-pod-identity-association.

AWS CLI

Example 1: To create an EKS Pod Identity association in EKS cluster

The following create-pod-identity-association example creates an EKS Pod Identity association between a service account in the EKS cluster and an IAM role.

aws eks create-pod-identity-association \ --cluster-name eks-customer \ --namespace default \ --service-account default \ --role-arn arn:aws:iam::123456789012:role/my-role

Output:

{ "association": { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "roleArn": "arn:aws:iam::123456789012:role/my-role", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-8mvwvh57cu74mgcst", "associationId": "a-8mvwvh57cu74mgcst", "tags": {}, "createdAt": "2025-05-24T19:40:13.961000-05:00", "modifiedAt": "2025-05-24T19:40:13.961000-05:00" } }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

Example 2: To create an EKS Pod Identity association in EKS cluster with tags

The following create-pod-identity-association example creates an EKS Pod Identity association between a service account and an IAM role in the EKS cluster with tags.

aws eks create-pod-identity-association \ --cluster-name eks-customer \ --namespace default \ --service-account default \ --role-arn arn:aws:iam::123456789012:role/my-role \ --tags Key1=value1,Key2=value2

Output:

{ "association": { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "roleArn": "arn:aws:iam::123456789012:role/my-role", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-9njjin9gfghecgoda", "associationId": "a-9njjin9gfghecgoda", "tags": { "Key2": "value2", "Key1": "value1" }, "createdAt": "2025-05-24T19:52:14.135000-05:00", "modifiedAt": "2025-05-24T19:52:14.135000-05:00" } }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

The following code example shows how to use delete-access-entry.

AWS CLI

To delete an access entry associated with the cluster

The following delete-access-entry example deletes an access entry associated with the EKS cluster named eks-customer.

aws eks delete-access-entry \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/Admin

This command produces no output.

For more information, see Delete access entries in the Amazon EKS User Guide.

The following code example shows how to use delete-addon.

AWS CLI

Example 1: To delete an Amazon EKS add-on but preserve the add-on software on the EKS cluster

The following delete-addon example command deletes an Amazon EKS add-on but preserve the add-on software on the EKS Cluster.

aws eks delete-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon \ --preserve

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "DELETING", "addonVersion": "v1.9.3-eksbuild.7", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2024-03-14T11:49:09.009000-04:00", "modifiedAt": "2024-03-14T12:03:49.776000-04:00", "tags": {} } }

For more information, see Remove an Amazon EKS add-on from a cluster in the Amazon EKS User Guide.

Example 2: To delete an Amazon EKS add-on and also delete the add-on software from the EKS cluster

The following delete-addon example command deletes an Amazon EKS add-on and also delete the add-on software from the EKS Cluster.

aws eks delete-addon \ --cluster-name my-eks-cluster \ --addon-name my-eks-addon

Output:

{ "addon": { "addonName": "my-eks-addon", "clusterName": "my-eks-cluster", "status": "DELETING", "addonVersion": "v1.15.1-eksbuild.1", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/my-eks-addon/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "createdAt": "2024-03-14T11:45:31.983000-04:00", "modifiedAt": "2024-03-14T11:58:40.136000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/role-name", "tags": {} } }

For more information, see Remove an Amazon EKS add-on from a cluster in the Amazon EKS User Guide.

  • For API details, see DeleteAddon in AWS CLI Command Reference.

The following code example shows how to use delete-cluster.

AWS CLI

To delete an Amazon EKS cluster control plane

The following delete-cluster example deletes an Amazon EKS cluster control plane.

aws eks delete-cluster \ --name my-eks-cluster

Output:

{ "cluster": { "name": "my-eks-cluster", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster", "createdAt": "2024-03-14T11:31:44.348000-04:00", "version": "1.27", "endpoint": "https://DALSJ343KE23J3RN45653DSKJTT647TYD.yl4.us-west-2.eks.amazonaws.com", "roleArn": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-cluster-ServiceRole-zMF6CBakwwbW", "resourcesVpcConfig": { "subnetIds": [ "subnet-0fb75d2d8401716e7", "subnet-02184492f67a3d0f9", "subnet-04098063527aab776", "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "securityGroupIds": [ "sg-0c1327f6270afbb36" ], "clusterSecurityGroupId": "sg-01c84d09d70f39a7f", "vpcId": "vpc-0012b8e1cc0abb17d", "endpointPublicAccess": true, "endpointPrivateAccess": true, "publicAccessCidrs": [ "0.0.0.0/0" ] }, "kubernetesNetworkConfig": { "serviceIpv4Cidr": "10.100.0.0/16", "ipFamily": "ipv4" }, "logging": { "clusterLogging": [ { "types": [ "api", "audit", "authenticator", "controllerManager", "scheduler" ], "enabled": true } ] }, "identity": { "oidc": { "issuer": "https://oidc.eks.us-west-2.amazonaws.com/id/DALSJ343KE23J3RN45653DSKJTT647TYD" } }, "status": "DELETING", "certificateAuthority": { "data": "XXX_CA_DATA_XXX" }, "platformVersion": "eks.16", "tags": { "aws:cloudformation:stack-name": "eksctl-my-eks-cluster-cluster", "alpha.eksctl.io/cluster-name": "my-eks-cluster", "karpenter.sh/discovery": "my-eks-cluster", "aws:cloudformation:stack-id": "arn:aws:cloudformation:us-west-2:123456789012:stack/eksctl-my-eks-cluster-cluster/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "auto-delete": "no", "eksctl.cluster.k8s.io/v1alpha1/cluster-name": "my-eks-cluster", "EKS-Cluster-Name": "my-eks-cluster", "alpha.eksctl.io/cluster-oidc-enabled": "true", "aws:cloudformation:logical-id": "ControlPlane", "alpha.eksctl.io/eksctl-version": "0.173.0-dev+a7ee89342.2024-03-01T03:40:57Z", "Name": "eksctl-my-eks-cluster-cluster/ControlPlane" }, "accessConfig": { "authenticationMode": "API_AND_CONFIG_MAP" } } }

For more information, see Deleting an Amazon EKS cluster in the Amazon EKS User Guide.

  • For API details, see DeleteCluster in AWS CLI Command Reference.

The following code example shows how to use delete-fargate-profile.

AWS CLI

To delete an EKS Fargate profile

The following delete-fargate-profile example creates an EKS Fargate Profile for a selector with a namespace.

aws eks delete-fargate-profile \ --cluster-name my-eks-cluster \ --fargate-profile-name my-fargate-profile

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "createdAt": "2024-03-19T11:48:39.975000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/role-name", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "default", "labels": { "foo": "bar" } } ], "status": "DELETING", "tags": {} } }

For more information, see AWS Fargate profile - Deleting a Fargate in the Amazon EKS User Guide.

The following code example shows how to use delete-nodegroup.

AWS CLI

To delete a managed node group for an Amazon EKS cluster

The following delete-nodegroup example deletes a managed node group for an Amazon EKS cluster.

aws eks delete-nodegroup \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup

Output:

{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-nodegroup/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-08T13:25:15.033000-04:00", "modifiedAt": "2024-04-08T13:25:31.252000-04:00", "status": "DELETING", "capacityType": "SPOT", "scalingConfig": { "minSize": 1, "maxSize": 5, "desiredSize": 4 }, "instanceTypes": [ "t3.large" ], "subnets": [ "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::123456789012:role/role-name", "labels": { "my-eks-nodegroup-label-2": "value-2", "my-eks-nodegroup-label-1": "value-1" }, "taints": [ { "key": "taint-key-1", "value": "taint-value-1", "effect": "NO_EXECUTE" } ], "diskSize": 50, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 2 }, "tags": { "my-eks-nodegroup-key-1": "value-1", "my-eks-nodegroup-key-2": "value-2" } } }

For more information, see Delete a managed node group from your cluster in the Amazon EKS User Guide.

The following code example shows how to use delete-pod-identity-association.

AWS CLI

To delete the EKS Pod Identity association

The following delete-pod-identity-association example deletes the EKS Pod Identity association with association ID a-9njjin9gfghecgocd from the EKS cluster named eks-customer.

aws eks delete-pod-identity-association \ --cluster-name eks-customer \ --association-id a-9njjin9gfghecgocd

Output:

{ "association": { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "roleArn": "arn:aws:iam::123456789012:role/s3-role", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-9njjin9gfghecgocd", "associationId": "a-9njjin9gfghecgocd", "tags": { "Key2": "value2", "Key1": "value1" }, "createdAt": "2025-05-24T19:52:14.135000-05:00", "modifiedAt": "2025-05-25T21:10:56.923000-05:00" } }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

The following code example shows how to use deregister-cluster.

AWS CLI

To deregisters a connected cluster to remove it from the Amazon EKS control plane

The following deregister-cluster example deregisters a connected cluster to remove it from the Amazon EKS control plane.

aws eks deregister-cluster \ --name my-eks-anywhere-cluster

Output:

{ "cluster": { "name": "my-eks-anywhere-cluster", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/my-eks-anywhere-cluster", "createdAt": "2024-04-12T12:38:37.561000-04:00", "status": "DELETING", "tags": {}, "connectorConfig": { "activationId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "activationExpiry": "2024-04-15T12:38:37.082000-04:00", "provider": "EKS_ANYWHERE", "roleArn": "arn:aws:iam::123456789012:role/AmazonEKSConnectorAgentRole" } } }

For more information, see Deregistering a cluster in the Amazon EKS User Guide.

The following code example shows how to use describe-access-entry.

AWS CLI

To describe the access entry for EKS cluster

The following describe-access-entry example describes an access entry for the EKS cluster.

aws eks describe-access-entry \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:user/eks-admin-user

Output:

{ "accessEntry": { "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:user/eks-admin-user", "kubernetesGroups": [], "accessEntryArn": "arn:aws:eks:us-west-2:123456789012:access-entry/eks-customer/user/123456789012/eks-admin-user/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2025-04-14T22:45:48.097000-05:00", "modifiedAt": "2025-04-14T22:45:48.097000-05:00", "tags": {}, "username": "arn:aws:iam::123456789012:user/eks-admin-user", "type": "STANDARD" } }

For more information, see Grant IAM users access to Kubernetes with EKS access entries in the Amazon EKS User Guide.

The following code example shows how to use describe-addon-configuration.

AWS CLI

Example 1: To describe the configuration options available when creating or updating Amazon vpc-cni AddOns

The following describe-addon-configuration example returns the all the available configuration schema you use when an add-on is created or updated for vpc-cni add-on with respective version.

aws eks describe-addon-configuration \ --addon-name vpc-cni \ --addon-version v1.15.1-eksbuild.1

Output:

{ "addonName": "vpc-cni", "addonVersion": "v1.15.1-eksbuild.1", "configurationSchema": "{\"$ref\":\"#/definitions/VpcCni\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"definitions\":{\"Affinity\":{\"type\":[\"object\",\"null\"]},\"EniConfig\":{\"additionalProperties\":false,\"properties\":{\"create\":{\"type\":\"boolean\"},\"region\":{\"type\":\"string\"},\"subnets\":{\"additionalProperties\":{\"additionalProperties\":false,\"properties\":{\"id\":{\"type\":\"string\"},\"securityGroups\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"}},\"required\":[\"id\"],\"type\":\"object\"},\"minProperties\":1,\"type\":\"object\"}},\"required\":[\"create\",\"region\",\"subnets\"],\"type\":\"object\"},\"Env\":{\"additionalProperties\":false,\"properties\":{\"ADDITIONAL_ENI_TAGS\":{\"type\":\"string\"},\"ANNOTATE_POD_IP\":{\"format\":\"boolean\",\"type\":\"string\"},\"AWS_EC2_ENDPOINT\":{\"type\":\"string\"},\"AWS_EXTERNAL_SERVICE_CIDRS\":{\"type\":\"string\"},\"AWS_MANAGE_ENIS_NON_SCHEDULABLE\":{\"format\":\"boolean\",\"type\":\"string\"},\"AWS_VPC_CNI_NODE_PORT_SUPPORT\":{\"format\":\"boolean\",\"type\":\"string\"},\"AWS_VPC_ENI_MTU\":{\"format\":\"integer\",\"type\":\"string\"},\"AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG\":{\"format\":\"boolean\",\"type\":\"string\"},\"AWS_VPC_K8S_CNI_EXCLUDE_SNAT_CIDRS\":{\"type\":\"string\"},\"AWS_VPC_K8S_CNI_EXTERNALSNAT\":{\"format\":\"boolean\",\"type\":\"string\"},\"AWS_VPC_K8S_CNI_LOGLEVEL\":{\"type\":\"string\"},\"AWS_VPC_K8S_CNI_LOG_FILE\":{\"type\":\"string\"},\"AWS_VPC_K8S_CNI_RANDOMIZESNAT\":{\"type\":\"string\"},\"AWS_VPC_K8S_CNI_VETHPREFIX\":{\"type\":\"string\"},\"AWS_VPC_K8S_PLUGIN_LOG_FILE\":{\"type\":\"string\"},\"AWS_VPC_K8S_PLUGIN_LOG_LEVEL\":{\"type\":\"string\"},\"CLUSTER_ENDPOINT\":{\"type\":\"string\"},\"DISABLE_INTROSPECTION\":{\"format\":\"boolean\",\"type\":\"string\"},\"DISABLE_LEAKED_ENI_CLEANUP\":{\"format\":\"boolean\",\"type\":\"string\"},\"DISABLE_METRICS\":{\"format\":\"boolean\",\"type\":\"string\"},\"DISABLE_NETWORK_RESOURCE_PROVISIONING\":{\"format\":\"boolean\",\"type\":\"string\"},\"DISABLE_POD_V6\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_BANDWIDTH_PLUGIN\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_POD_ENI\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_PREFIX_DELEGATION\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_V4_EGRESS\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_V6_EGRESS\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENI_CONFIG_ANNOTATION_DEF\":{\"type\":\"string\"},\"ENI_CONFIG_LABEL_DEF\":{\"type\":\"string\"},\"INTROSPECTION_BIND_ADDRESS\":{\"type\":\"string\"},\"IP_COOLDOWN_PERIOD\":{\"format\":\"integer\",\"type\":\"string\"},\"MAX_ENI\":{\"format\":\"integer\",\"type\":\"string\"},\"MINIMUM_IP_TARGET\":{\"format\":\"integer\",\"type\":\"string\"},\"POD_SECURITY_GROUP_ENFORCING_MODE\":{\"type\":\"string\"},\"WARM_ENI_TARGET\":{\"format\":\"integer\",\"type\":\"string\"},\"WARM_IP_TARGET\":{\"format\":\"integer\",\"type\":\"string\"},\"WARM_PREFIX_TARGET\":{\"format\":\"integer\",\"type\":\"string\"}},\"title\":\"Env\",\"type\":\"object\"},\"Init\":{\"additionalProperties\":false,\"properties\":{\"env\":{\"$ref\":\"#/definitions/InitEnv\"}},\"title\":\"Init\",\"type\":\"object\"},\"InitEnv\":{\"additionalProperties\":false,\"properties\":{\"DISABLE_TCP_EARLY_DEMUX\":{\"format\":\"boolean\",\"type\":\"string\"},\"ENABLE_V6_EGRESS\":{\"format\":\"boolean\",\"type\":\"string\"}},\"title\":\"InitEnv\",\"type\":\"object\"},\"Limits\":{\"additionalProperties\":false,\"properties\":{\"cpu\":{\"type\":\"string\"},\"memory\":{\"type\":\"string\"}},\"title\":\"Limits\",\"type\":\"object\"},\"NodeAgent\":{\"additionalProperties\":false,\"properties\":{\"enableCloudWatchLogs\":{\"format\":\"boolean\",\"type\":\"string\"},\"enablePolicyEventLogs\":{\"format\":\"boolean\",\"type\":\"string\"},\"healthProbeBindAddr\":{\"format\":\"integer\",\"type\":\"string\"},\"metricsBindAddr\":{\"format\":\"integer\",\"type\":\"string\"}},\"title\":\"NodeAgent\",\"type\":\"object\"},\"Resources\":{\"additionalProperties\":false,\"properties\":{\"limits\":{\"$ref\":\"#/definitions/Limits\"},\"requests\":{\"$ref\":\"#/definitions/Limits\"}},\"title\":\"Resources\",\"type\":\"object\"},\"Tolerations\":{\"additionalProperties\":false,\"items\":{\"type\":\"object\"},\"type\":\"array\"},\"VpcCni\":{\"additionalProperties\":false,\"properties\":{\"affinity\":{\"$ref\":\"#/definitions/Affinity\"},\"enableNetworkPolicy\":{\"format\":\"boolean\",\"type\":\"string\"},\"enableWindowsIpam\":{\"format\":\"boolean\",\"type\":\"string\"},\"eniConfig\":{\"$ref\":\"#/definitions/EniConfig\"},\"env\":{\"$ref\":\"#/definitions/Env\"},\"init\":{\"$ref\":\"#/definitions/Init\"},\"livenessProbeTimeoutSeconds\":{\"type\":\"integer\"},\"nodeAgent\":{\"$ref\":\"#/definitions/NodeAgent\"},\"readinessProbeTimeoutSeconds\":{\"type\":\"integer\"},\"resources\":{\"$ref\":\"#/definitions/Resources\"},\"tolerations\":{\"$ref\":\"#/definitions/Tolerations\"}},\"title\":\"VpcCni\",\"type\":\"object\"}},\"description\":\"vpc-cni\"}" }

For more information, see Determine fields you can customize for Amazon EKS add-ons in the Amazon EKS User Guide.

Example 2: To describe the configuration options available when creating or updating Amazon coredns AddOns

The following describe-addon-configuration example returns all the available configuration schema you use when an add-on is created or updated for coredns add-on with respective version.

aws eks describe-addon-configuration \ --addon-name coredns \ --addon-version v1.8.7-eksbuild.4

Output:

{ "addonName": "coredns", "addonVersion": "v1.8.7-eksbuild.4", "configurationSchema": "{\"$ref\":\"#/definitions/Coredns\",\"$schema\":\"http://json-schema.org/draft-06/schema#\",\"definitions\":{\"Coredns\":{\"additionalProperties\":false,\"properties\":{\"computeType\":{\"type\":\"string\"},\"corefile\":{\"description\":\"Entire corefile contents to use with installation\",\"type\":\"string\"},\"nodeSelector\":{\"additionalProperties\":{\"type\":\"string\"},\"type\":\"object\"},\"replicaCount\":{\"type\":\"integer\"},\"resources\":{\"$ref\":\"#/definitions/Resources\"}},\"title\":\"Coredns\",\"type\":\"object\"},\"Limits\":{\"additionalProperties\":false,\"properties\":{\"cpu\":{\"type\":\"string\"},\"memory\":{\"type\":\"string\"}},\"title\":\"Limits\",\"type\":\"object\"},\"Resources\":{\"additionalProperties\":false,\"properties\":{\"limits\":{\"$ref\":\"#/definitions/Limits\"},\"requests\":{\"$ref\":\"#/definitions/Limits\"}},\"title\":\"Resources\",\"type\":\"object\"}}}" }

For more information, see Determine fields you can customize for Amazon EKS add-ons in the Amazon EKS User Guide.

The following code example shows how to use describe-addon-versions.

AWS CLI

Example 1: To list all the available addons for EKS Cluster

The following describe-addon-versions example list all the available AWS addons.

aws eks describe-addon-versions \ --query 'sort_by(addons &owner)[].{publisher: publisher, owner: owner, addonName: addonName, type: type}' \ --output table

Output:

-------------------------------------------------------------------------------------------------------------------- | DescribeAddonVersions | +---------------------------------------------+------------------+-----------------------+-------------------------+ | addonName | owner | publisher | type | +---------------------------------------------+------------------+-----------------------+-------------------------+ | vpc-cni | aws | eks | networking | | snapshot-controller | aws | eks | storage | | kube-proxy | aws | eks | networking | | eks-pod-identity-agent | aws | eks | security | | coredns | aws | eks | networking | | aws-mountpoint-s3-csi-driver | aws | s3 | storage | | aws-guardduty-agent | aws | eks | security | | aws-efs-csi-driver | aws | eks | storage | | aws-ebs-csi-driver | aws | eks | storage | | amazon-cloudwatch-observability | aws | eks | observability | | adot | aws | eks | observability | | upwind-security_upwind-operator | aws-marketplace | Upwind Security | security | | upbound_universal-crossplane | aws-marketplace | upbound | infra-management | | tetrate-io_istio-distro | aws-marketplace | tetrate-io | policy-management | | teleport_teleport | aws-marketplace | teleport | policy-management | | stormforge_optimize-live | aws-marketplace | StormForge | cost-management | | splunk_splunk-otel-collector-chart | aws-marketplace | Splunk | monitoring | | solo-io_istio-distro | aws-marketplace | Solo.io | service-mesh | | rafay-systems_rafay-operator | aws-marketplace | rafay-systems | kubernetes-management | | new-relic_kubernetes-operator | aws-marketplace | New Relic | observability | | netapp_trident-operator | aws-marketplace | NetApp Inc. | storage | | leaksignal_leakagent | aws-marketplace | leaksignal | monitoring | | kubecost_kubecost | aws-marketplace | kubecost | cost-management | | kong_konnect-ri | aws-marketplace | kong | ingress-service-type | | kasten_k10 | aws-marketplace | Kasten by Veeam | data-protection | | haproxy-technologies_kubernetes-ingress-ee | aws-marketplace | HAProxy Technologies | ingress-controller | | groundcover_agent | aws-marketplace | groundcover | monitoring | | grafana-labs_kubernetes-monitoring | aws-marketplace | Grafana Labs | monitoring | | factorhouse_kpow | aws-marketplace | factorhouse | monitoring | | dynatrace_dynatrace-operator | aws-marketplace | dynatrace | monitoring | | datree_engine-pro | aws-marketplace | datree | policy-management | | datadog_operator | aws-marketplace | Datadog | monitoring | | cribl_cribledge | aws-marketplace | Cribl | observability | | calyptia_fluent-bit | aws-marketplace | Calyptia Inc | observability | | accuknox_kubearmor | aws-marketplace | AccuKnox | security | +---------------------------------------------+------------------+-----------------------+-------------------------+

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 2: To list all the available addons for specified Kubernetes version supported for EKS

The following describe-addon-versions example list all the available addons for specified Kubernetes version supported for EKS.

aws eks describe-addon-versions \ --kubernetes-version=1.26 \ --query 'sort_by(addons &owner)[].{publisher: publisher, owner: owner, addonName: addonName, type: type}' \ --output table

Output:

-------------------------------------------------------------------------------------------------------------------- | DescribeAddonVersions | +---------------------------------------------+------------------+-----------------------+-------------------------+ | addonName | owner | publisher | type | +---------------------------------------------+------------------+-----------------------+-------------------------+ | vpc-cni | aws | eks | networking | | snapshot-controller | aws | eks | storage | | kube-proxy | aws | eks | networking | | eks-pod-identity-agent | aws | eks | security | | coredns | aws | eks | networking | | aws-mountpoint-s3-csi-driver | aws | s3 | storage | | aws-guardduty-agent | aws | eks | security | | aws-efs-csi-driver | aws | eks | storage | | aws-ebs-csi-driver | aws | eks | storage | | amazon-cloudwatch-observability | aws | eks | observability | | adot | aws | eks | observability | | upwind-security_upwind-operator | aws-marketplace | Upwind Security | security | | tetrate-io_istio-distro | aws-marketplace | tetrate-io | policy-management | | stormforge_optimize-live | aws-marketplace | StormForge | cost-management | | splunk_splunk-otel-collector-chart | aws-marketplace | Splunk | monitoring | | solo-io_istio-distro | aws-marketplace | Solo.io | service-mesh | | rafay-systems_rafay-operator | aws-marketplace | rafay-systems | kubernetes-management | | new-relic_kubernetes-operator | aws-marketplace | New Relic | observability | | netapp_trident-operator | aws-marketplace | NetApp Inc. | storage | | leaksignal_leakagent | aws-marketplace | leaksignal | monitoring | | kubecost_kubecost | aws-marketplace | kubecost | cost-management | | kong_konnect-ri | aws-marketplace | kong | ingress-service-type | | haproxy-technologies_kubernetes-ingress-ee | aws-marketplace | HAProxy Technologies | ingress-controller | | groundcover_agent | aws-marketplace | groundcover | monitoring | | grafana-labs_kubernetes-monitoring | aws-marketplace | Grafana Labs | monitoring | | dynatrace_dynatrace-operator | aws-marketplace | dynatrace | monitoring | | datadog_operator | aws-marketplace | Datadog | monitoring | | cribl_cribledge | aws-marketplace | Cribl | observability | | calyptia_fluent-bit | aws-marketplace | Calyptia Inc | observability | | accuknox_kubearmor | aws-marketplace | AccuKnox | security | +---------------------------------------------+------------------+-----------------------+-------------------------+

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

Example 3: To list all the available vpc-cni addons version for specified Kubernetes version supported for EKS

The following describe-addon-versions example list all the available vpc-cni addons version for specified Kubernetes version supported for EKS.

aws eks describe-addon-versions \ --kubernetes-version=1.26 \ --addon-name=vpc-cni \ --query='addons[].addonVersions[].addonVersion'

Output:

[ "v1.18.0-eksbuild.1", "v1.17.1-eksbuild.1", "v1.16.4-eksbuild.2", "v1.16.3-eksbuild.2", "v1.16.2-eksbuild.1", "v1.16.0-eksbuild.1", "v1.15.5-eksbuild.1", "v1.15.4-eksbuild.1", "v1.15.3-eksbuild.1", "v1.15.1-eksbuild.1", "v1.15.0-eksbuild.2", "v1.14.1-eksbuild.1", "v1.14.0-eksbuild.3", "v1.13.4-eksbuild.1", "v1.13.3-eksbuild.1", "v1.13.2-eksbuild.1", "v1.13.0-eksbuild.1", "v1.12.6-eksbuild.2", "v1.12.6-eksbuild.1", "v1.12.5-eksbuild.2", "v1.12.0-eksbuild.2" ]

For more information, see Managing Amazon EKS add-ons - Creating an add-on in the Amazon EKS User Guide.

The following code example shows how to use describe-addon.

AWS CLI

To describe an actively running EKS addon in your Amazon EKS cluster

The following describe-addon example actively running EKS addon in your Amazon EKS cluster.

aws eks describe-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni

Output:

{ "addon": { "addonName": "vpc-cni", "clusterName": "my-eks-cluster", "status": "ACTIVE", "addonVersion": "v1.16.4-eksbuild.2", "health": { "issues": [] }, "addonArn": "arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/vpc-cni/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2024-03-14T13:18:45.417000-04:00", "modifiedAt": "2024-03-14T13:18:49.557000-04:00", "serviceAccountRoleArn": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm", "tags": { "eks-addon-key-3": "value-3", "eks-addon-key-4": "value-4" }, "configurationValues": "resources:\n limits:\n cpu: '100m'\nenv:\n AWS_VPC_K8S_CNI_LOGLEVEL: 'DEBUG'" } }

For more information, see Amazon EKS add-ons in the Amazon EKS User Guide.

  • For API details, see DescribeAddon in AWS CLI Command Reference.

The following code example shows how to use describe-cluster.

AWS CLI

To describe an Amazon EKS cluster

The following describe-cluster example actively running EKS addon in your Amazon EKS cluster.

aws eks describe-cluster \ --name my-eks-cluster

Output:

{ "cluster": { "name": "my-eks-cluster", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster", "createdAt": "2024-03-14T11:31:44.348000-04:00", "version": "1.26", "endpoint": "https://JSA79429HJDASKJDJ8223829MNDNASW.yl4.us-west-2.eks.amazonaws.com", "roleArn": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-cluster-ServiceRole-zMF6CBakwwbW", "resourcesVpcConfig": { "subnetIds": [ "subnet-0fb75d2d8401716e7", "subnet-02184492f67a3d0f9", "subnet-04098063527aab776", "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "securityGroupIds": [ "sg-0c1327f6270afbb36" ], "clusterSecurityGroupId": "sg-01c84d09d70f39a7f", "vpcId": "vpc-0012b8e1cc0abb17d", "endpointPublicAccess": true, "endpointPrivateAccess": true, "publicAccessCidrs": [ "22.19.18.2/32" ] }, "kubernetesNetworkConfig": { "serviceIpv4Cidr": "10.100.0.0/16", "ipFamily": "ipv4" }, "logging": { "clusterLogging": [ { "types": [ "api", "audit", "authenticator", "controllerManager", "scheduler" ], "enabled": true } ] }, "identity": { "oidc": { "issuer": "https://oidc.eks.us-west-2.amazonaws.com/id/JSA79429HJDASKJDJ8223829MNDNASW" } }, "status": "ACTIVE", "certificateAuthority": { "data": "CA_DATA_STRING..." }, "platformVersion": "eks.14", "tags": { "aws:cloudformation:stack-name": "eksctl-my-eks-cluster-cluster", "alpha.eksctl.io/cluster-name": "my-eks-cluster", "karpenter.sh/discovery": "my-eks-cluster", "aws:cloudformation:stack-id": "arn:aws:cloudformation:us-west-2:123456789012:stack/eksctl-my-eks-cluster-cluster/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "auto-delete": "no", "eksctl.cluster.k8s.io/v1alpha1/cluster-name": "my-eks-cluster", "EKS-Cluster-Name": "my-eks-cluster", "alpha.eksctl.io/cluster-oidc-enabled": "true", "aws:cloudformation:logical-id": "ControlPlane", "alpha.eksctl.io/eksctl-version": "0.173.0-dev+a7ee89342.2024-03-01T03:40:57Z", "Name": "eksctl-my-eks-cluster-cluster/ControlPlane" }, "health": { "issues": [] }, "accessConfig": { "authenticationMode": "API_AND_CONFIG_MAP" } } }

For more information, see Amazon EKS cluster lifecycle and configuration in the Amazon EKS User Guide.

The following code example shows how to use describe-fargate-profile.

AWS CLI

To describe a Fargate profile

The following describe-fargate-profile example describes a Fargate profile.

aws eks describe-fargate-profile \ --cluster-name my-eks-cluster \ --fargate-profile-name my-fargate-profile

Output:

{ "fargateProfile": { "fargateProfileName": "my-fargate-profile", "fargateProfileArn": "arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "createdAt": "2024-04-11T10:42:52.486000-04:00", "podExecutionRoleArn": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-farga-FargatePodExecutionRole-1htfAaJdJUEO", "subnets": [ "subnet-09d912bb63ef21b9a", "subnet-04ad87f71c6e5ab4d", "subnet-0e2907431c9988b72" ], "selectors": [ { "namespace": "prod*", "labels": { "labelname*?": "*value1" } }, { "namespace": "*dev*", "labels": { "labelname*?": "*value*" } } ], "status": "ACTIVE", "tags": { "eks-fargate-profile-key-2": "value-2", "eks-fargate-profile-key-1": "value-1" } } }

For more information, see Define which Pods use AWS Fargate when launched in the Amazon EKS User Guide.

The following code example shows how to use describe-identity-provider-config.

AWS CLI

To describe an identity provider configuration associated to your Amazon EKS Cluster

The following describe-identity-provider-config example describes an identity provider configuration associated to your Amazon EKS Cluster.

aws eks describe-identity-provider-config \ --cluster-name my-eks-cluster \ --identity-provider-config type=oidc,name=my-identity-provider

Output:

{ "identityProviderConfig": { "oidc": { "identityProviderConfigName": "my-identity-provider", "identityProviderConfigArn": "arn:aws:eks:us-west-2:123456789012:identityproviderconfig/my-eks-cluster/oidc/my-identity-provider/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "issuerUrl": "https://oidc.eks.us-west-2.amazonaws.com/id/38D6A4619A0A69E342B113ED7F1A7652", "clientId": "kubernetes", "usernameClaim": "email", "usernamePrefix": "my-username-prefix", "groupsClaim": "my-claim", "groupsPrefix": "my-groups-prefix", "requiredClaims": { "Claim1": "value1", "Claim2": "value2" }, "tags": { "env": "dev" }, "status": "ACTIVE" } } }

For more information, see Authenticate users for your cluster from an OpenID Connect identity provider in the Amazon EKS User Guide.

The following code example shows how to use describe-insight.

AWS CLI

To get the details of an insight for an EKS cluster using its ID

The following describe-insight example returns the details about the insight specified using the cluster name and insight ID.

aws eks describe-insight \ --cluster-name eks-customer \ --id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111

Output:

{ "insight": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "name": "Kubelet version skew", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.33", "lastRefreshTime": "2025-05-24T11:22:50-05:00", "lastTransitionTime": "2025-05-24T11:22:50-05:00", "description": "Checks for kubelet versions of worker nodes in the cluster to see if upgrade would cause noncompliance with supported Kubernetes kubelet version skew policy.", "insightStatus": { "status": "PASSING", "reason": "Node kubelet versions match the cluster control plane version." }, "recommendation": "Upgrade your worker nodes to match the Kubernetes version of your cluster control plane.", "additionalInfo": { "Kubelet version skew policy": "https://kubernetes.io/releases/version-skew-policy/#kubelet", "Updating a managed node group": "https://docs.aws.amazon.com/eks/latest/userguide/update-managed-node-group.html" }, "resources": [], "categorySpecificSummary": { "deprecationDetails": [] } } }

For more information, see View cluster insights in the Amazon EKS User Guide.

The following code example shows how to use describe-nodegroup.

AWS CLI

To describe a managed node group for an Amazon EKS cluster

The following describe-nodegroup example describes a managed node group for an Amazon EKS cluster.

aws eks describe-nodegroup \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup

Output:

{ "nodegroup": { "nodegroupName": "my-eks-nodegroup", "nodegroupArn": "arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-nodegroup/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "clusterName": "my-eks-cluster", "version": "1.26", "releaseVersion": "1.26.12-20240329", "createdAt": "2024-04-08T11:42:10.555000-04:00", "modifiedAt": "2024-04-08T11:44:12.402000-04:00", "status": "ACTIVE", "capacityType": "ON_DEMAND", "scalingConfig": { "minSize": 1, "maxSize": 3, "desiredSize": 1 }, "instanceTypes": [ "t3.medium" ], "subnets": [ "subnet-0e2907431c9988b72", "subnet-04ad87f71c6e5ab4d", "subnet-09d912bb63ef21b9a" ], "amiType": "AL2_x86_64", "nodeRole": "arn:aws:iam::123456789012:role/role-name", "labels": {}, "resources": { "autoScalingGroups": [ { "name": "eks-my-eks-nodegroup-a8c75f2f-df78-a72f-4063-4b69af3de5b1" } ] }, "diskSize": 20, "health": { "issues": [] }, "updateConfig": { "maxUnavailable": 1 }, "tags": {} } }

For more information, see Simplify node lifecycle with managed node groups in the Amazon EKS User Guide.

The following code example shows how to use describe-pod-identity-association.

AWS CLI

To provide the details about Pod Identity association

The following describe-pod-identity-association example describes a Pod Identity association in the EKS cluster.

aws eks describe-pod-identity-association \ --cluster-name eks-customer \ --association-id a-9njjin9gfghecgocd

Output:

{ "association": { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "roleArn": "arn:aws:iam::123456789012:role/my-role", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-9njjin9gfghecgocd", "associationId": "a-9njjin9gfghecgocd", "tags": { "Key2": "value2", "Key1": "value1" }, "createdAt": "2025-05-24T19:52:14.135000-05:00", "modifiedAt": "2025-05-24T19:52:14.135000-05:00" } }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

The following code example shows how to use describe-update.

AWS CLI

Example 1: To describe an update for a cluster

The following describe-update example describes an update for a cluster named.

aws eks describe-update \ --name my-eks-cluster \ --update-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "Successful", "type": "EndpointAccessUpdate", "params": [ { "type": "EndpointPublicAccess", "value": "false" }, { "type": "EndpointPrivateAccess", "value": "true" } ], "createdAt": "2024-03-14T10:01:26.297000-04:00", "errors": [] } }

For more information, see Updating an Amazon EKS cluster Kubernetes version in the Amazon EKS User Guide.

Example 2: To describe an update for a cluster

The following describe-update example describes an update for a cluster named.

aws eks describe-update \ --name my-eks-cluster \ --update-id a1b2c3d4-5678-90ab-cdef-EXAMPLE22222

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "status": "Successful", "type": "AssociateEncryptionConfig", "params": [ { "type": "EncryptionConfig", "value": "[{\"resources\":[\"secrets\"],\"provider\":{\"keyArn\":\"arn:aws:kms:region-code:account:key/key\"}}]" } ], "createdAt": "2024-03-14T11:01:26.297000-04:00", "errors": [] } }

For more information, see Updating an Amazon EKS cluster Kubernetes version in the Amazon EKS User Guide.

Example 3: To describe an update for a cluster

The following describe-update example describes an update for a cluster named.

aws eks describe-update \ --name my-eks-cluster \ --update-id a1b2c3d4-5678-90ab-cdef-EXAMPLE33333

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "status": "Successful", "type": "VersionUpdate", "params": [ { "type": "Version", "value": "1.29" }, { "type": "PlatformVersion", "value": "eks.1" } ], "createdAt": "2024-03-14T12:05:26.297000-04:00", "errors": [] } }

For more information, see Updating an Amazon EKS cluster Kubernetes version in the Amazon EKS User Guide.

The following code example shows how to use disassociate-access-policy.

AWS CLI

To disassociate the access policy from an access entry

The following disassociate-access-policy example removes the access policy associated with the access entry.

aws eks disassociate-access-policy \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/Admin \ --policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy

This command produces no output.

For more information, see Associate access policies with access entries in the Amazon EKS User Guide.

The following code example shows how to use disassociate-identity-provider-config.

AWS CLI

To disassociate an identity provider from your Amazon EKS Cluster

The following disassociate-identity-provider-config example disassociates an identity provider to your Amazon EKS Cluster.

aws eks disassociate-identity-provider-config \ --cluster-name my-eks-cluster \ --identity-provider-config 'type=oidc,name=my-identity-provider'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "DisassociateIdentityProviderConfig", "params": [ { "type": "IdentityProviderConfig", "value": "[]" } ], "createdAt": "2024-04-11T13:53:43.314000-04:00", "errors": [] } }

For more information, see Authenticate users for your cluster from an OpenID Connect identity provider - Disassociate an OIDC identity provider from your cluster in the Amazon EKS User Guide.

The following code example shows how to use get-token.

AWS CLI

Example 1: To get an authentication token for an Amazon EKS Cluster named `my-eks-cluster`

The following get-token example gets an authentication token for an Amazon EKS Cluster named my-eks-cluster.

aws eks get-token \ --cluster-name my-eks-cluster

Output:

{ "kind": "ExecCredential", "apiVersion": "client.authentication.k8s.io/v1beta1", "spec": {}, "status": { "expirationTimestamp": "2024-04-11T20:59:56Z", "token": "k8s-aws-v1.EXAMPLE_TOKEN_DATA_STRING..." } }

For more information, see Connect kubectl to an EKS cluster by creating a kubeconfig file in the Amazon EKS User Guide.

Example 2: To get an authentication token for an Amazon EKS Cluster named `my-eks-cluster` by assuming a role ARN for credentials when signing the token

The following get-token example gets an authentication token for an Amazon EKS Cluster named my-eks-cluster by assuming this roleARN for credentials when signing the token.

aws eks get-token \ --cluster-name my-eks-cluster \ --role-arn arn:aws:iam::123456789012:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM

Output:

{ "kind": "ExecCredential", "apiVersion": "client.authentication.k8s.io/v1beta1", "spec": {}, "status": { "expirationTimestamp": "2024-04-11T21:05:26Z", "token": "k8s-aws-v1.EXAMPLE_TOKEN_DATA_STRING..." } }

For more information, see Connect kubectl to an EKS cluster by creating a kubeconfig file in the Amazon EKS User Guide.

  • For API details, see GetToken in AWS CLI Command Reference.

The following code example shows how to use list-access-entries.

AWS CLI

To list the access entries for an EKS cluster

The following list-access-entries example returns the list of access entries associated with the EKS cluster eks-customer.

aws eks list-access-entries \ --cluster-name eks-customer

Output:

{ "accessEntries": [ "arn:aws:iam::123456789012:role/Admin", "arn:aws:iam::123456789012:role/admin-test-ip", "arn:aws:iam::123456789012:role/assume-worker-node-role", "arn:aws:iam::123456789012:user/eks-admin-user" ] }

For more information, see Grant IAM users access to Kubernetes with EKS access entries in the Amazon EKS User Guide.

The following code example shows how to use list-access-policies.

AWS CLI

To list all available access policies

The following list-access-policies example returns the list of all available access policies.

aws eks list-access-policies

Output:

{ "accessPolicies": [ { "name": "AmazonEKSAdminPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy" }, { "name": "AmazonEKSAdminViewPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminViewPolicy" }, { "name": "AmazonEKSAutoNodePolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSAutoNodePolicy" }, { "name": "AmazonEKSBlockStorageClusterPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSBlockStorageClusterPolicy" }, { "name": "AmazonEKSBlockStoragePolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSBlockStoragePolicy" }, { "name": "AmazonEKSClusterAdminPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy" }, { "name": "AmazonEKSComputeClusterPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSComputeClusterPolicy" }, { "name": "AmazonEKSComputePolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSComputePolicy" }, { "name": "AmazonEKSEditPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy" }, { "name": "AmazonEKSHybridPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSHybridPolicy" }, { "name": "AmazonEKSLoadBalancingClusterPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSLoadBalancingClusterPolicy" }, { "name": "AmazonEKSLoadBalancingPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSLoadBalancingPolicy" }, { "name": "AmazonEKSNetworkingClusterPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSNetworkingClusterPolicy" }, { "name": "AmazonEKSNetworkingPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSNetworkingPolicy" }, { "name": "AmazonEKSViewPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy" }, { "name": "AmazonEMRJobPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonEMRJobPolicy" }, { "name": "AmazonSagemakerHyperpodClusterPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonSagemakerHyperpodClusterPolicy" }, { "name": "AmazonSagemakerHyperpodControllerPolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonSagemakerHyperpodControllerPolicy" }, { "name": "AmazonSagemakerHyperpodSystemNamespacePolicy", "arn": "arn:aws:eks::aws:cluster-access-policy/AmazonSagemakerHyperpodSystemNamespacePolicy" } ] }

For more information, see Associate access policies with access entries in the Amazon EKS User Guide.

The following code example shows how to use list-addons.

AWS CLI

To list all the installed add-ons in your Amazon EKS cluster named `my-eks-cluster`

The following list-addons example lists all the installed add-ons in your Amazon EKS cluster named my-eks-cluster.

aws eks list-addons \ --cluster-name my-eks-cluster

Output:

{ "addons": [ "kube-proxy", "vpc-cni" ] }

For more information, see Amazon EKS add-ons in the Amazon EKS User Guide.

  • For API details, see ListAddons in AWS CLI Command Reference.

The following code example shows how to use list-associated-access-policies.

AWS CLI

To list the access policies associated with an access entry

The following list-associated-access-policies example returns the list of access policies associated with an access entry in the EKS cluster.

aws eks list-associated-access-policies \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/Admin

Output:

{ "associatedAccessPolicies": [ { "policyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy", "accessScope": { "type": "cluster", "namespaces": [] }, "associatedAt": "2025-05-24T17:26:22.935000-05:00", "modifiedAt": "2025-05-24T17:26:22.935000-05:00" } ], "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:role/Admin" }

For more information, see Grant IAM users access to Kubernetes with EKS access entries in the Amazon EKS User Guide.

The following code example shows how to use list-clusters.

AWS CLI

To list all the installed add-ons in your Amazon EKS cluster named `my-eks-cluster`

The following list-clusters example lists all the installed add-ons in your Amazon EKS cluster named my-eks-cluster.

aws eks list-clusters

Output:

{ "clusters": [ "prod", "qa", "stage", "my-eks-cluster" ] }

For more information, see Amazon EKS cluster lifecycle and configuration in the Amazon EKS User Guide.

  • For API details, see ListClusters in AWS CLI Command Reference.

The following code example shows how to use list-fargate-profiles.

AWS CLI

To list all the fargate profiles in your Amazon EKS cluster named `my-eks-cluster`

The following list-fargate-profiles example lists all the fargate profiles in your Amazon EKS cluster named my-eks-cluster.

aws eks list-fargate-profiles \ --cluster-name my-eks-cluster

Output:

{ "fargateProfileNames": [ "my-fargate-profile" ] }

For more information, see Define which Pods use AWS Fargate when launched in the Amazon EKS User Guide.

The following code example shows how to use list-identity-provider-configs.

AWS CLI

To list identity providers associated to an Amazon EKS Cluster

The following list-identity-provider-configs example lists identity provider associated to an Amazon EKS Cluster.

aws eks list-identity-provider-configs \ --cluster-name my-eks-cluster

Output:

{ "identityProviderConfigs": [ { "type": "oidc", "name": "my-identity-provider" } ] }

For more information, see Authenticate users for your cluster from an OpenID Connect identity provider in the Amazon EKS User Guide.

The following code example shows how to use list-insights.

AWS CLI

To list all insights for the specified cluster

The following list-insights example returns the list of all insights checked against the specified cluster.

aws eks list-insights \ --cluster-name eks-customer

Output:

{ "insights": [ { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "name": "Kubelet version skew", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.33", "lastRefreshTime": "2025-05-24T11:22:50-05:00", "lastTransitionTime": "2025-05-24T11:22:50-05:00", "description": "Checks for kubelet versions of worker nodes in the cluster to see if upgrade would cause noncompliance with supported Kubernetes kubelet version skew policy.", "insightStatus": { "status": "PASSING", "reason": "Node kubelet versions match the cluster control plane version." } }, { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "name": "EKS add-on version compatibility", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.33", "lastRefreshTime": "2025-05-24T11:22:59-05:00", "lastTransitionTime": "2025-05-24T11:22:50-05:00", "description": "Checks version of installed EKS add-ons to ensure they are compatible with the next version of Kubernetes. ", "insightStatus": { "status": "PASSING", "reason": "All installed EKS add-on versions are compatible with next Kubernetes version." } }, { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "name": "Cluster health issues", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.33", "lastRefreshTime": "2025-05-24T11:22:59-05:00", "lastTransitionTime": "2025-05-24T11:22:50-05:00", "description": "Checks for any cluster health issues that prevent successful upgrade to the next Kubernetes version on EKS.", "insightStatus": { "status": "PASSING", "reason": "No cluster health issues detected." } }, { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "name": "kube-proxy version skew", "category": "UPGRADE_READINESS", "kubernetesVersion": "1.33", "lastRefreshTime": "2025-05-24T11:22:50-05:00", "lastTransitionTime": "2025-05-24T11:22:50-05:00", "description": "Checks version of kube-proxy in cluster to see if upgrade would cause noncompliance with supported Kubernetes kube-proxy version skew policy.", "insightStatus": { "status": "PASSING", "reason": "kube-proxy versions match the cluster control plane version." } } ] }

For more information, see View cluster insights in the Amazon EKS User Guide.

  • For API details, see ListInsights in AWS CLI Command Reference.

The following code example shows how to use list-nodegroups.

AWS CLI

To list all the node groups in an Amazon EKS cluster

The following list-nodegroups example list all the node groups in an Amazon EKS cluster.

aws eks list-nodegroups \ --cluster-name my-eks-cluster

Output:

{ "nodegroups": [ "my-eks-managed-node-group", "my-eks-nodegroup" ] }

For more information, see Simplify node lifecycle with managed node groups in the Amazon EKS User Guide.

The following code example shows how to use list-pod-identity-associations.

AWS CLI

Example 1: To list the Pod Identity associations in an EKS cluster

The following list-pod-identity-associations example returns the list of Pod Identity associations associated with the EKS cluster named eks-customer in all namespaces and service accounts.

aws eks list-pod-identity-associations \ --cluster-name eks-customer

Output:

{ "associations": [ { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-9njjin9gfghecgocd", "associationId": "a-9njjin9gfghecgocd" }, { "clusterName": "eks-customer", "namespace": "kube-system", "serviceAccount": "eks-customer", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-dvtacahdvjn01ffbc", "associationId": "a-dvtacahdvjn01ffbc" }, { "clusterName": "eks-customer", "namespace": "kube-system", "serviceAccount": "coredns", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-yrpsdroc4ei7k6xps", "associationId": "a-yrpsdroc4ei7k6xps" } ] }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

Example 2: To list the Pod Identity associations in an EKS cluster based on namespace and service account

The following list-pod-identity-associations example returns the list of Pod Identity associations in the EKS cluster based on namespace and service account.

aws eks list-pod-identity-associations \ --cluster-name eks-customer \ --namespace kube-system \ --service-account eks-customer

Output:

{ "associations": [ { "clusterName": "eks-customer", "namespace": "kube-system", "serviceAccount": "eks-customer", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-dvtacahdvjn01ffbc", "associationId": "a-dvtacahdvjn01ffbc" } ] }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.

The following code example shows how to use list-tags-for-resource.

AWS CLI

Example 1: To list all the tags for an Amazon EKS Cluster ARN

The following list-tags-for-resource example lists all the tags for an Amazon EKS Cluster ARN.

aws eks list-tags-for-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster

Output:

{ "tags": { "aws:cloudformation:stack-name": "eksctl-my-eks-cluster-cluster", "alpha.eksctl.io/cluster-name": "my-eks-cluster", "karpenter.sh/discovery": "my-eks-cluster", "aws:cloudformation:stack-id": "arn:aws:cloudformation:us-west-2:123456789012:stack/eksctl-my-eks-cluster-cluster/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "auto-delete": "no", "eksctl.cluster.k8s.io/v1alpha1/cluster-name": "my-eks-cluster", "EKS-Cluster-Name": "my-eks-cluster", "alpha.eksctl.io/cluster-oidc-enabled": "true", "aws:cloudformation:logical-id": "ControlPlane", "alpha.eksctl.io/eksctl-version": "0.173.0-dev+a7ee89342.2024-03-01T03:40:57Z", "Name": "eksctl-my-eks-cluster-cluster/ControlPlane" } }

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 2: To list all the tags for an Amazon EKS Node group ARN

The following list-tags-for-resource example lists all the tags for an Amazon EKS Node group ARN.

aws eks list-tags-for-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-managed-node-group/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222

Output:

{ "tags": { "aws:cloudformation:stack-name": "eksctl-my-eks-cluster-nodegroup-my-eks-managed-node-group", "aws:cloudformation:stack-id": "arn:aws:cloudformation:us-west-2:123456789012:stack/eksctl-my-eks-cluster-nodegroup-my-eks-managed-node-group/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "eksctl.cluster.k8s.io/v1alpha1/cluster-name": "my-eks-cluster", "EKS-Cluster-Name": "my-eks-cluster", "alpha.eksctl.io/nodegroup-type": "managed", "NodeGroup Name 1": "my-eks-managed-node-group", "k8s.io/cluster-autoscaler/enabled": "true", "nodegroup-role": "worker", "alpha.eksctl.io/cluster-name": "my-eks-cluster", "alpha.eksctl.io/nodegroup-name": "my-eks-managed-node-group", "karpenter.sh/discovery": "my-eks-cluster", "NodeGroup Name 2": "AmazonLinux-Linux-Managed-NG-v1-26-v1", "auto-delete": "no", "k8s.io/cluster-autoscaler/my-eks-cluster": "owned", "aws:cloudformation:logical-id": "ManagedNodeGroup", "alpha.eksctl.io/eksctl-version": "0.173.0-dev+a7ee89342.2024-03-01T03:40:57Z" } }

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 3: To list all the tags on an Amazon EKS Fargate profil ARNe

The following list-tags-for-resource example lists all the tags for an Amazon EKS Fargate profile ARN.

aws eks list-tags-for-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:fargateprofile/my-eks-cluster/my-fargate-profile/a1b2c3d4-5678-90ab-cdef-EXAMPLE44444

Output:

{ "tags": { "eks-fargate-profile-key-2": "value-2", "eks-fargate-profile-key-1": "value-1" } }

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 4: To list all the tags for an Amazon EKS Add-on ARN

The following list-tags-for-resource example lists all the tags for an Amazon EKS Add-on ARN.

aws eks list-tags-for-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:addon/my-eks-cluster/vpc-cni/a1b2c3d4-5678-90ab-cdef-EXAMPLE55555

Output:

{ "tags": { "eks-addon-key-2": "value-2", "eks-addon-key-1": "value-1" } }

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 5: To list all the tags for an Amazon EKS OIDC identity provider ARN

The following list-tags-for-resource example lists all the tags for an Amazon EKS OIDC identity provider ARN.

aws eks list-tags-for-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:identityproviderconfig/my-eks-cluster/oidc/my-identity-provider/a1b2c3d4-5678-90ab-cdef-EXAMPLE66666

Output:

{ "tags": { "my-identity-provider": "test" } }

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

The following code example shows how to use list-updates.

AWS CLI

Example 1: To list the updates for a cluster

The following list-updates example lists the current updates for a cluster named example in your default region.

aws eks list-updates \ --name example

Output:

{ "updateIds": [ "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" ] }

Example 2: To list all the update IDs for an Amazon EKS Node group

The following list-updates example lists all the update IDs for an Amazon EKS Node group.

aws eks list-updates \ --name my-eks-cluster \ --nodegroup-name my-eks-managed-node-group

Output:

{ "updateIds": [ "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222" ] }

Example 3: To list all the update IDs for an Amazon EKS add-on

The following list-updates example lists all the update IDs for an Amazon EKS Add-on.

aws eks list-updates \ --name my-eks-cluster \ --addon-name vpc-cni

Output:

{ "updateIds": [ "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333" ] }

For more information, see Update existing cluster to new Kubernetes version in the Amazon EKS User Guide.

  • For API details, see ListUpdates in AWS CLI Command Reference.

The following code example shows how to use register-cluster.

AWS CLI

Example 1: To register an external EKS_ANYWHERE Kubernetes cluster to Amazon EKS

The following register-cluster example registers an external EKS_ANYWHERE Kubernetes cluster to Amazon EKS.

aws eks register-cluster \ --name my-eks-anywhere-cluster \ --connector-config 'roleArn=arn:aws:iam::123456789012:role/AmazonEKSConnectorAgentRole,provider=EKS_ANYWHERE'

Output:

{ "cluster": { "name": "my-eks-anywhere-cluster", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/my-eks-anywhere-cluster", "createdAt": "2024-04-12T12:38:37.561000-04:00", "status": "PENDING", "tags": {}, "connectorConfig": { "activationId": "xxxxxxxxACTIVATION_IDxxxxxxxx", "activationCode": "xxxxxxxxACTIVATION_CODExxxxxxxx", "activationExpiry": "2024-04-15T12:38:37.082000-04:00", "provider": "EKS_ANYWHERE", "roleArn": "arn:aws:iam::123456789012:role/AmazonEKSConnectorAgentRole" } } }

For more information, see Connecting an external cluster in the Amazon EKS User Guide.

Example 2: To register any external Kubernetes cluster to Amazon EKS

The following register-cluster example registers an external EKS_ANYWHERE Kubernetes cluster to Amazon EKS.

aws eks register-cluster \ --name my-eks-anywhere-cluster \ --connector-config 'roleArn=arn:aws:iam::123456789012:role/AmazonEKSConnectorAgentRole,provider=OTHER'

Output:

{ "cluster": { "name": "my-onprem-k8s-cluster", "arn": "arn:aws:eks:us-west-2:123456789012:cluster/my-onprem-k8s-cluster", "createdAt": "2024-04-12T12:42:10.861000-04:00", "status": "PENDING", "tags": {}, "connectorConfig": { "activationId": "xxxxxxxxACTIVATION_IDxxxxxxxx", "activationCode": "xxxxxxxxACTIVATION_CODExxxxxxxx", "activationExpiry": "2024-04-15T12:42:10.339000-04:00", "provider": "OTHER", "roleArn": "arn:aws:iam::123456789012:role/AmazonEKSConnectorAgentRole" } } }

For more information, see Connecting an external cluster in the Amazon EKS User Guide.

The following code example shows how to use tag-resource.

AWS CLI

Example 1: To add the specified tags to an Amazon EKS Cluster

The following tag-resource example adds the specified tags to an Amazon EKS Cluster.

aws eks tag-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster \ --tag 'my-eks-cluster-test-1=test-value-1,my-eks-cluster-dev-1=dev-value-2'

This command produces no output.

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 2: To add the specified tags to an Amazon EKS Node group

The following tag-resource example adds the specified tags to an Amazon EKS Node group.

aws eks tag-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-managed-node-group/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \ --tag 'my-eks-nodegroup-test-1=test-value-1,my-eks-nodegroup-dev-1=dev-value-2'

This command produces no output.

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

  • For API details, see TagResource in AWS CLI Command Reference.

The following code example shows how to use untag-resource.

AWS CLI

Example 1: To deletes the specified tags from an Amazon EKS Cluster

The following untag-resource example deletes the specified tags from an Amazon EKS Cluster.

aws eks untag-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster \ --tag-keys "my-eks-cluster-test-1" "my-eks-cluster-dev-1"

This command produces no output.

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

Example 2: To deletes the specified tags from an Amazon EKS Node group

The following untag-resource example deletes the specified tags from an Amazon EKS Node group.

aws eks untag-resource \ --resource-arn arn:aws:eks:us-west-2:123456789012:nodegroup/my-eks-cluster/my-eks-managed-node-group/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \ --tag-keys "my-eks-nodegroup-test-1" "my-eks-nodegroup-dev-1"

This command produces no output.

For more information, see Organize Amazon EKS resources with tags in the Amazon EKS User Guide.

  • For API details, see UntagResource in AWS CLI Command Reference.

The following code example shows how to use update-access-entry.

AWS CLI

To update an access entry for an EKS cluster

The following update-access-entry example updates an access entry for the EKS cluster by adding the Kubernetes group tester.

aws eks update-access-entry \ --cluster-name eks-customer \ --principal-arn arn:aws:iam::123456789012:role/Admin \ --kubernetes-groups tester

Output:

{ "accessEntry": { "clusterName": "eks-customer", "principalArn": "arn:aws:iam::123456789012:role/Admin", "kubernetesGroups": [ "tester" ], "accessEntryArn": "arn:aws:eks:us-west-2:123456789012:access-entry/eks-customer/role/123456789012/Admin/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2025-05-24T11:02:04.432000-05:00", "modifiedAt": "2025-05-24T17:08:01.608000-05:00", "tags": {}, "username": "arn:aws:sts::123456789012:assumed-role/Admin/{{SessionName}}", "type": "STANDARD" } }

For more information, see Update access entries in the Amazon EKS User Guide.

The following code example shows how to use update-addon.

AWS CLI

Example 1: To update an Amazon EKS add-on with service account role ARN

The following update-addon example command updates an Amazon EKS add-on with service account role ARN.

aws eks update-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni \ --service-account-role-arn arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "AddonUpdate", "params": [ { "type": "ServiceAccountRoleArn", "value": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm" } ], "createdAt": "2024-04-12T16:04:55.614000-04:00", "errors": [] } }

For more information, see Managing Amazon EKS add-ons - Updating an add-on in the Amazon EKS User Guide.

Example 2: To update an Amazon EKS add-on with specific add-on version

The following update-addon example command updates an Amazon EKS add-on with specific add-on version.

aws eks update-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni \ --service-account-role-arn arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm \ --addon-version v1.16.4-eksbuild.2

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "status": "InProgress", "type": "AddonUpdate", "params": [ { "type": "AddonVersion", "value": "v1.16.4-eksbuild.2" }, { "type": "ServiceAccountRoleArn", "value": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm" } ], "createdAt": "2024-04-12T16:07:16.550000-04:00", "errors": [] } }

For more information, see Managing Amazon EKS add-ons - Updating an add-on in the Amazon EKS User Guide.

Example 3: To update an Amazon EKS add-on with custom configuration values and resolve conflicts details

The following update-addon example command updates an Amazon EKS add-on with custom configuration values and resolve conflicts details.

aws eks update-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni \ --service-account-role-arn arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm \ --addon-version v1.16.4-eksbuild.2 \ --configuration-values '{"resources": {"limits":{"cpu":"100m"}, "requests":{"cpu":"50m"}}}' \ --resolve-conflicts PRESERVE

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "status": "InProgress", "type": "AddonUpdate", "params": [ { "type": "AddonVersion", "value": "v1.16.4-eksbuild.2" }, { "type": "ServiceAccountRoleArn", "value": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm" }, { "type": "ResolveConflicts", "value": "PRESERVE" }, { "type": "ConfigurationValues", "value": "{\"resources\": {\"limits\":{\"cpu\":\"100m\"}, \"requests\":{\"cpu\":\"50m\"}}}" } ], "createdAt": "2024-04-12T16:16:27.363000-04:00", "errors": [] } }

For more information, see Managing Amazon EKS add-ons - Updating an add-on in the Amazon EKS User Guide.

Example 4: To update an Amazon EKS add-on with custom JSON configuration values file

The following update-addon example command updates an Amazon EKS add-on with custom JSON configuration values and resolve conflicts details.

aws eks update-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni \ --service-account-role-arn arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm \ --addon-version v1.17.1-eksbuild.1 \ --configuration-values 'file://configuration-values.json' \ --resolve-conflicts PRESERVE

Contents of configuration-values.json:

{ "resources": { "limits": { "cpu": "100m" }, "requests": { "cpu": "50m" } }, "env": { "AWS_VPC_K8S_CNI_LOGLEVEL": "ERROR" } }

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "status": "InProgress", "type": "AddonUpdate", "params": [ { "type": "AddonVersion", "value": "v1.17.1-eksbuild.1" }, { "type": "ServiceAccountRoleArn", "value": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm" }, { "type": "ResolveConflicts", "value": "PRESERVE" }, { "type": "ConfigurationValues", "value": "{\n \"resources\": {\n \"limits\": {\n \"cpu\": \"100m\"\n },\n \"requests\": {\n \"cpu\": \"50m\"\n }\n },\n \"env\": {\n \"AWS_VPC_K8S_CNI_LOGLEVEL\": \"ERROR\"\n }\n}" } ], "createdAt": "2024-04-12T16:22:55.519000-04:00", "errors": [] } }

For more information, see Managing Amazon EKS add-ons - Updating an add-on in the Amazon EKS User Guide.

Example 5: To update an Amazon EKS add-on with custom YAML configuration values file

The following update-addon example command updates an Amazon EKS add-on with custom YAML configuration values and resolve conflicts details.

aws eks update-addon \ --cluster-name my-eks-cluster \ --addon-name vpc-cni \ --service-account-role-arn arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm \ --addon-version v1.18.0-eksbuild.1 \ --configuration-values 'file://configuration-values.yaml' \ --resolve-conflicts PRESERVE

Contents of configuration-values.yaml:

resources: limits: cpu: '100m' requests: cpu: '50m' env: AWS_VPC_K8S_CNI_LOGLEVEL: 'DEBUG'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE55555", "status": "InProgress", "type": "AddonUpdate", "params": [ { "type": "AddonVersion", "value": "v1.18.0-eksbuild.1" }, { "type": "ServiceAccountRoleArn", "value": "arn:aws:iam::123456789012:role/eksctl-my-eks-cluster-addon-vpc-cni-Role1-YfakrqOC1UTm" }, { "type": "ResolveConflicts", "value": "PRESERVE" }, { "type": "ConfigurationValues", "value": "resources:\n limits:\n cpu: '100m'\n requests:\n cpu: '50m'\nenv:\n AWS_VPC_K8S_CNI_LOGLEVEL: 'DEBUG'" } ], "createdAt": "2024-04-12T16:25:07.212000-04:00", "errors": [] } }

For more information, see Managing Amazon EKS add-ons - Updating an add-on in the Amazon EKS User Guide.

  • For API details, see UpdateAddon in AWS CLI Command Reference.

The following code example shows how to use update-cluster-config.

AWS CLI

Example 1: To update cluster endpoint access

The following update-cluster-config example updates a cluster to disable endpoint public access and enable private endpoint access.

aws eks update-cluster-config \ --name example \ --resources-vpc-config endpointPublicAccess=false,endpointPrivateAccess=true

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "EndpointAccessUpdate", "params": [ { "type": "EndpointPublicAccess", "value": "false" }, { "type": "EndpointPrivateAccess", "value": "true" } ], "createdAt": 1565806986.506, "errors": [] } }

For more information, see Cluster API server endpoint in the Amazon EKS User Guide.

Example 2: To enable logging for a cluster

The following update-cluster-config example enables all cluster control plane logging types for a cluster named example.

aws eks update-cluster-config \ --name example \ --logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "status": "InProgress", "type": "LoggingUpdate", "params": [ { "type": "ClusterLogging", "value": "{\"clusterLogging\":[{\"types\":[\"api\",\"audit\",\"authenticator\",\"controllerManager\",\"scheduler\"],\"enabled\":true}]}" } ], "createdAt": 1565807210.37, "errors": [] } }

For more information, see Send control plane logs to CloudWatch Logs in the Amazon EKS User Guide.

The following code example shows how to use update-cluster-version.

AWS CLI

To updates an Amazon EKS cluster named `my-eks-cluster` to the specified Kubernetes version

The following update-cluster-version example updates an Amazon EKS cluster to the specified Kubernetes version.

aws eks update-cluster-version \ --name my-eks-cluster \ --kubernetes-version 1.27

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "VersionUpdate", "params": [ { "type": "Version", "value": "1.27" }, { "type": "PlatformVersion", "value": "eks.16" } ], "createdAt": "2024-04-12T16:56:01.082000-04:00", "errors": [] } }

For more information, see Updating an Amazon EKS cluster Kubernetes version in the Amazon EKS User Guide.

The following code example shows how to use update-kubeconfig.

AWS CLI

Example 1: To configure your kubectl by creating or updating the kubeconfig so that you can connect to an Amazon EKS Cluster named `my-eks-cluster`

The following update-kubeconfig example configures your kubectl by creating or updating the kubeconfig so that you can connect to an Amazon EKS Cluster named my-eks-cluster.

aws eks update-kubeconfig \ --name my-eks-cluster

Output:

Updated context arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster in /Users/xxx/.kube/config

For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide.

Example 2: To configure your kubectl by creating or updating the kubeconfig (with role-arn option to assume a role for cluster authentication) so that you can connect to an Amazon EKS Cluster named `my-eks-cluster`

The following update-kubeconfig example configures your kubectl by creating or updating the kubeconfig (with role-arn option to assume a role for cluster authentication) so that you can connect to an Amazon EKS Cluster named my-eks-cluster.

aws eks update-kubeconfig \ --name my-eks-cluster \ --role-arn arn:aws:iam::123456789012:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM

Output:

Updated context arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster in /Users/xxx/.kube/config

For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide.

Example 3: To configure your kubectl by creating or updating the kubeconfig (with role-arn option to assume a role for cluster authentication along with custom cluster alias and user-alias) so that you can connect to an Amazon EKS Cluster named `my-eks-cluster`

The following update-kubeconfig example configures your kubectl by creating or updating the kubeconfig (with role-arn option to assume a role for cluster authentication along with custom cluster alias and user-alias) so that you can connect to an Amazon EKS Cluster named my-eks-cluster.

aws eks update-kubeconfig \ --name my-eks-cluster \ --role-arn arn:aws:iam::123456789012:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM \ --alias stage-eks-cluster \ --user-alias john

Output:

Updated context stage-eks-cluster in /Users/dubaria/.kube/config

For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide.

Example 4: To print kubeconfig file entries for review and configure your kubectl so that you can connect to an Amazon EKS Cluster named `my-eks-cluster`

The following update-kubeconfig example configures your kubectl by creating or updating the kubeconfig (with role-arn option to assume a role for cluster authentication along with custom cluster alias and user-alias) so that you can connect to an Amazon EKS Cluster named my-eks-cluster.

aws eks update-kubeconfig \ --name my-eks-cluster \ --role-arn arn:aws:iam::123456789012:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM \ --alias stage-eks-cluster \ --user-alias john \ --verbose

Output:

Updated context stage-eks-cluster in /Users/dubaria/.kube/config Entries: context: cluster: arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster user: john name: stage-eks-cluster name: john user: exec: apiVersion: client.authentication.k8s.io/v1beta1 args: - --region - us-west-2 - eks - get-token - --cluster-name - my-eks-cluster - --output - json - --role - arn:aws:iam::123456789012:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM command: aws cluster: certificate-authority-data: xxx_CA_DATA_xxx server: https://DALSJ343KE23J3RN45653DSKJTT647TYD.yl4.us-west-2.eks.amazonaws.com name: arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster

For more information, see Creating or updating a kubeconfig file for an Amazon EKS cluster in the Amazon EKS User Guide.

The following code example shows how to use update-nodegroup-config.

AWS CLI

Example 1: To update a managed node group to add new labels and taint to EKS worker node for an Amazon EKS cluster

The following update-nodegroup-config example updates a managed node group to add new labels and taint to EKS worker node for an Amazon EKS cluster.

aws eks update-nodegroup-config \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --labels 'addOrUpdateLabels={my-eks-nodegroup-label-1=value-1,my-eks-nodegroup-label-2=value-2}' \ --taints 'addOrUpdateTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "ConfigUpdate", "params": [ { "type": "LabelsToAdd", "value": "{\"my-eks-nodegroup-label-2\":\"value-2\",\"my-eks-nodegroup-label-1\":\"value-1\"}" }, { "type": "TaintsToAdd", "value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]" } ], "createdAt": "2024-04-08T12:05:19.161000-04:00", "errors": [] } }

For more information, see Updating a managed node group in the Amazon EKS User Guide.

Example 2: To update a managed node group to remove labels and taint for the EKS worker node for an Amazon EKS cluster

The following update-nodegroup-config example updates a managed node group to remove labels and taint for the EKS worker node for an Amazon EKS cluster.

aws eks update-nodegroup-config \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --labels 'removeLabels=my-eks-nodegroup-label-1, my-eks-nodegroup-label-2' \ --taints 'removeTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "status": "InProgress", "type": "ConfigUpdate", "params": [ { "type": "LabelsToRemove", "value": "[\"my-eks-nodegroup-label-1\",\"my-eks-nodegroup-label-2\"]" }, { "type": "TaintsToRemove", "value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]" } ], "createdAt": "2024-04-08T12:17:31.817000-04:00", "errors": [] } }

For more information, see Updating a managed node group in the Amazon EKS User Guide.

Example 3: To update a managed node group to remove and add labels and taint for the EKS worker node for an Amazon EKS cluster

The following update-nodegroup-config example updates a managed node group to remove and add labels and taint for the EKS worker node for an Amazon EKS cluster.

aws eks update-nodegroup-config \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --labels 'addOrUpdateLabels={my-eks-nodegroup-new-label-1=new-value-1,my-eks-nodegroup-new-label-2=new-value-2},removeLabels=my-eks-nodegroup-label-1, my-eks-nodegroup-label-2' \ --taints 'addOrUpdateTaints=[{key=taint-new-key-1,value=taint-new-value-1,effect=PREFER_NO_SCHEDULE}],removeTaints=[{key=taint-key-1,value=taint-value-1,effect=NO_EXECUTE}]'

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "status": "InProgress", "type": "ConfigUpdate", "params": [ { "type": "LabelsToAdd", "value": "{\"my-eks-nodegroup-new-label-1\":\"new-value-1\",\"my-eks-nodegroup-new-label-2\":\"new-value-2\"}" }, { "type": "LabelsToRemove", "value": "[\"my-eks-nodegroup-label-1\",\"my-eks-nodegroup-label-2\"]" }, { "type": "TaintsToAdd", "value": "[{\"effect\":\"PREFER_NO_SCHEDULE\",\"value\":\"taint-new-value-1\",\"key\":\"taint-new-key-1\"}]" }, { "type": "TaintsToRemove", "value": "[{\"effect\":\"NO_EXECUTE\",\"value\":\"taint-value-1\",\"key\":\"taint-key-1\"}]" } ], "createdAt": "2024-04-08T12:30:55.486000-04:00", "errors": [] } }

For more information, see Updating a managed node group in the Amazon EKS User Guide.

Example 4: To update a managed node group to update scaling-config and update-config for the EKS worker node for an Amazon EKS cluster

The following update-nodegroup-config example updates a managed node group to update scaling-config and update-config for the EKS worker node for an Amazon EKS cluster.

aws eks update-nodegroup-config \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --scaling-config minSize=1,maxSize=5,desiredSize=2 \ --update-config maxUnavailable=2

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "status": "InProgress", "type": "ConfigUpdate", "params": [ { "type": "MinSize", "value": "1" }, { "type": "MaxSize", "value": "5" }, { "type": "DesiredSize", "value": "2" }, { "type": "MaxUnavailable", "value": "2" } ], "createdAt": "2024-04-08T12:35:17.036000-04:00", "errors": [] } }

For more information, see Updating a managed node group in the Amazon EKS User Guide.

The following code example shows how to use update-nodegroup-version.

AWS CLI

Example 1: To update the Kubernetes version or AMI version of an Amazon EKS managed node group to the latest available version

The following update-nodegroup-version example updates the Kubernetes version or AMI version of an Amazon EKS managed node group to the latest available version for your Kubernetes cluster.

aws eks update-nodegroup-version \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --no-force

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "status": "InProgress", "type": "VersionUpdate", "params": [ { "type": "Version", "value": "1.26" }, { "type": "ReleaseVersion", "value": "1.26.12-20240329" } ], "createdAt": "2024-04-08T13:16:00.724000-04:00", "errors": [] } }

For more information, see Updating a managed node group in the Amazon EKS User Guide.

Example 2: To update the Kubernetes version or AMI version of an Amazon EKS managed node group to a specified AMI release version

The following update-nodegroup-version example updates the Kubernetes version or AMI version of an Amazon EKS managed node group to the specified AMI release version.

aws eks update-nodegroup-version \ --cluster-name my-eks-cluster \ --nodegroup-name my-eks-nodegroup \ --kubernetes-version '1.26' \ --release-version '1.26.12-20240307' \ --no-force

Output:

{ "update": { "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "status": "InProgress", "type": "VersionUpdate", "params": [ { "type": "Version", "value": "1.26" }, { "type": "ReleaseVersion", "value": "1.26.12-20240307" } ], "createdAt": "2024-04-08T13:13:58.595000-04:00", "errors": [] } }

For more information, see Updating a managed node group - <https://docs.aws.amazon.com/eks/latest/userguide/update-managed-node-group.html>` in the Amazon EKS User Guide.

The following code example shows how to use update-pod-identity-association.

AWS CLI

To update the EKS Pod Identity association

The following update-pod-identity-association example updates an EKS Pod Identity association by changing the associated IAM role from arn:aws:iam::123456789012:role/my-role to arn:aws:iam::123456789012:role/s3-role for association ID a-9njjin9gfghecgocd. This API only allows updating the associated IAM role.

aws eks update-pod-identity-association \ --cluster-name eks-customer \ --association-id a-9njjin9gfghecgocd \ --role-arn arn:aws:iam::123456789012:role/s3-role

Output:

{ "association": { "clusterName": "eks-customer", "namespace": "default", "serviceAccount": "default", "roleArn": "arn:aws:iam::123456789012:role/s3-role", "associationArn": "arn:aws:eks:us-west-2:123456789012:podidentityassociation/eks-customer/a-9njjin9gfghecgocd", "associationId": "a-9njjin9gfghecgocd", "tags": { "Key2": "value2", "Key1": "value1" }, "createdAt": "2025-05-24T19:52:14.135000-05:00", "modifiedAt": "2025-05-25T21:01:53.120000-05:00" } }

For more information, see Learn how EKS Pod Identity grants pods access to AWS services in the Amazon EKS User Guide.