Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

AWS Commands Line Reference: aws eks

Table of Contents

Commands

aws eks associate-access-policy
aws eks associate-encryption-config
aws eks associate-identity-provider-config
aws eks create-access-entry
aws eks create-addon
aws eks create-cluster
aws eks create-eks-anywhere-subscription
aws eks create-fargate-profile
aws eks create-nodegroup
aws eks create-pod-identity-association
aws eks delete-access-entry
aws eks delete-addon
aws eks delete-cluster
aws eks delete-eks-anywhere-subscription
aws eks delete-fargate-profile
aws eks delete-nodegroup
aws eks delete-pod-identity-association
aws eks deregister-cluster
aws eks describe-access-entry
aws eks describe-addon
aws eks describe-addon-configuration
aws eks describe-addon-versions
aws eks describe-cluster
aws eks describe-cluster-versions
aws eks describe-eks-anywhere-subscription
aws eks describe-fargate-profile
aws eks describe-identity-provider-config
aws eks describe-insight
aws eks describe-nodegroup
aws eks describe-pod-identity-association
aws eks describe-update
aws eks disassociate-access-policy
aws eks disassociate-identity-provider-config
aws eks get-token
aws eks help
aws eks list-access-entries
aws eks list-access-policies
aws eks list-addons
aws eks list-associated-access-policies
aws eks list-clusters
aws eks list-eks-anywhere-subscriptions
aws eks list-fargate-profiles
aws eks list-identity-provider-configs
aws eks list-insights
aws eks list-nodegroups
aws eks list-pod-identity-associations
aws eks list-tags-for-resource
aws eks list-updates
aws eks register-cluster
aws eks tag-resource
aws eks untag-resource
aws eks update-access-entry
aws eks update-addon
aws eks update-cluster-config
aws eks update-cluster-version
aws eks update-eks-anywhere-subscription
aws eks update-kubeconfig
aws eks update-nodegroup-config
aws eks update-nodegroup-version
aws eks update-pod-identity-association
aws eks wait

Here is the detailed breakdown for each AWS EKS command, including its use case, description, and examples.


1. aws eks associate-access-policy

Use Case

Associates an access policy with an EKS cluster to manage IAM permissions.

Description

This command attaches an IAM access policy to an EKS cluster, defining how users or roles interact with Kubernetes resources.

Examples

aws eks associate-access-policy --cluster-name my-cluster --access-policy-arn arn:aws:iam::123456789012:policy/MyEKSAccessPolicy
aws eks associate-access-policy --cluster-name prod-cluster --access-policy-arn arn:aws:iam::123456789012:policy/AdminPolicy --region us-east-1

2. aws eks associate-encryption-config

Use Case

Enables or updates encryption configurations for an existing EKS cluster.

Description

This command configures KMS encryption for Kubernetes secrets and other sensitive data.

Examples

aws eks associate-encryption-config --cluster-name my-cluster --encryption-config '[{"resources":["secrets"],"provider":{"keyArn":"arn:aws:kms:us-east-1:123456789012:key/my-kms-key"}}]'
aws eks associate-encryption-config --cluster-name prod-cluster --encryption-config '[{"resources":["configmaps"],"provider":{"keyArn":"arn:aws:kms:us-west-2:123456789012:key/another-key"}}]'

3. aws eks associate-identity-provider-config

Use Case

Associates an OIDC identity provider with an EKS cluster for authentication.

Description

This command allows users to integrate an external identity provider (IdP) for authentication in EKS.

Examples

aws eks associate-identity-provider-config --cluster-name my-cluster --oidc "{\"issuer\":\"https://oidc.eks.region.amazonaws.com/id/oidc-provider-id\"}"
aws eks associate-identity-provider-config --cluster-name prod-cluster --oidc "{\"issuer\":\"https://auth.mycompany.com\"}"

4. aws eks create-access-entry

Use Case

Creates an access entry to define permissions for users or roles within an EKS cluster.

Description

Used for defining access entries that control who can perform what actions in an EKS cluster.

Examples

aws eks create-access-entry --cluster-name my-cluster --principal-arn arn:aws:iam::123456789012:role/MyEKSIAMRole --kubernetes-groups developers
aws eks create-access-entry --cluster-name dev-cluster --principal-arn arn:aws:iam::123456789012:user/DevUser --kubernetes-groups admins

5. aws eks create-addon

Use Case

Installs or updates an EKS add-on in a cluster.

Description

This command installs AWS-managed EKS add-ons such as CoreDNS, VPC CNI, and kube-proxy.

Examples

aws eks create-addon --cluster-name my-cluster --addon-name vpc-cni --addon-version latest
aws eks create-addon --cluster-name prod-cluster --addon-name coredns --resolve-conflicts OVERWRITE

6. aws eks create-cluster

Use Case

Creates a new EKS cluster.

Description

Provisions an EKS cluster with a given Kubernetes version, VPC settings, and IAM roles.

Examples

aws eks create-cluster --name my-cluster --role-arn arn:aws:iam::123456789012:role/MyEKSRole --resources-vpc-config subnetIds=subnet-abc123,securityGroupIds=sg-xyz789
aws eks create-cluster --name dev-cluster --kubernetes-version 1.27 --role-arn arn:aws:iam::123456789012:role/DevRole --resources-vpc-config subnetIds=subnet-aaa123,subnet-bbb456

7. aws eks create-eks-anywhere-subscription

Use Case

Subscribes to EKS Anywhere.

Description

Registers a subscription to AWS EKS Anywhere, enabling on-premises Kubernetes management.

Examples

aws eks create-eks-anywhere-subscription --account-id 123456789012
aws eks create-eks-anywhere-subscription --account-id 987654321000

8. aws eks create-fargate-profile

Use Case

Creates a Fargate profile for running Kubernetes pods on AWS Fargate.

Description

Configures Kubernetes namespaces and IAM roles for serverless pod execution.

Examples

aws eks create-fargate-profile --cluster-name my-cluster --fargate-profile-name my-profile --subnets subnet-12345 --selectors namespace=default
aws eks create-fargate-profile --cluster-name prod-cluster --fargate-profile-name backend-profile --subnets subnet-67890 --selectors namespace=backend

9. aws eks create-nodegroup

Use Case

Creates a new EKS node group.

Description

This command provisions EC2 worker nodes for an EKS cluster.

Examples

aws eks create-nodegroup --cluster-name my-cluster --nodegroup-name my-nodegroup --subnets subnet-abc123
aws eks create-nodegroup --cluster-name dev-cluster --nodegroup-name dev-nodes --subnets subnet-xyz789 --instance-types t3.medium

10. aws eks create-pod-identity-association

Use Case

Associates an IAM role with a Kubernetes service account.

Description

Used to enable IAM Role for Service Accounts (IRSA).

Examples

aws eks create-pod-identity-association --cluster-name my-cluster --service-account my-service-account --namespace default --role-arn arn:aws:iam::123456789012:role/MyEKSRole
aws eks create-pod-identity-association --cluster-name prod-cluster --service-account backend-service --namespace backend --role-arn arn:aws:iam::123456789012:role/BackendRole

I’ll document the remaining AWS EKS CLI commands with their use case, description, and examples.


AWS EKS CLI Commands (Complete List)


11. aws eks delete-access-entry

Use Case:

Deletes an access entry from an EKS cluster.

Description:

This removes a previously granted access entry for an IAM user or role.

Examples:

aws eks delete-access-entry --cluster-name my-cluster --principal-arn arn:aws:iam::123456789012:role/MyEKSIAMRole
aws eks delete-access-entry --cluster-name prod-cluster --principal-arn arn:aws:iam::123456789012:user/DevUser

12. aws eks delete-addon

Use Case:

Removes an EKS add-on from a cluster.

Description:

Deletes an installed EKS add-on such as CoreDNS, VPC CNI, or kube-proxy.

Examples:

aws eks delete-addon --cluster-name my-cluster --addon-name vpc-cni
aws eks delete-addon --cluster-name prod-cluster --addon-name coredns

13. aws eks delete-cluster

Use Case:

Deletes an EKS cluster.

Description:

Completely removes an EKS cluster and associated resources.

Examples:

aws eks delete-cluster --name my-cluster
aws eks delete-cluster --name prod-cluster

14. aws eks delete-eks-anywhere-subscription

Use Case:

Deletes an EKS Anywhere subscription.

Description:

Unsubscribes from EKS Anywhere.

Examples:

aws eks delete-eks-anywhere-subscription --account-id 123456789012
aws eks delete-eks-anywhere-subscription --account-id 987654321000

15. aws eks delete-fargate-profile

Use Case:

Deletes a Fargate profile from an EKS cluster.

Description:

Removes the serverless execution profile from EKS.

Examples:

aws eks delete-fargate-profile --cluster-name my-cluster --fargate-profile-name my-profile
aws eks delete-fargate-profile --cluster-name prod-cluster --fargate-profile-name backend-profile

16. aws eks delete-nodegroup

Use Case:

Deletes a node group from an EKS cluster.

Description:

Removes EC2 worker nodes from an EKS cluster.

Examples:

aws eks delete-nodegroup --cluster-name my-cluster --nodegroup-name my-nodegroup
aws eks delete-nodegroup --cluster-name dev-cluster --nodegroup-name dev-nodes

17. aws eks delete-pod-identity-association

Use Case:

Removes a pod identity association from an EKS cluster.

Description:

Unlinks an IAM role from a Kubernetes service account.

Examples:

aws eks delete-pod-identity-association --cluster-name my-cluster --service-account my-service-account --namespace default
aws eks delete-pod-identity-association --cluster-name prod-cluster --service-account backend-service --namespace backend

18. aws eks deregister-cluster

Use Case:

Deregisters an EKS cluster from AWS.

Description:

Removes an EKS cluster from AWS Management Console while keeping it running.

Examples:

aws eks deregister-cluster --name my-cluster
aws eks deregister-cluster --name prod-cluster

19. aws eks describe-access-entry

Use Case:

Gets details about an EKS access entry.

Description:

Displays access policy and permissions of a specific entry.

Examples:

aws eks describe-access-entry --cluster-name my-cluster --principal-arn arn:aws:iam::123456789012:role/MyEKSIAMRole
aws eks describe-access-entry --cluster-name prod-cluster --principal-arn arn:aws:iam::123456789012:user/DevUser

20. aws eks describe-addon

Use Case:

Describes an installed EKS add-on.

Description:

Fetches details about installed EKS add-ons.

Examples:

aws eks describe-addon --cluster-name my-cluster --addon-name vpc-cni
aws eks describe-addon --cluster-name prod-cluster --addon-name coredns

21. aws eks describe-addon-configuration

Use Case:

Describes EKS add-on configurations.

Description:

Provides details about configurable parameters of an add-on.

Examples:

aws eks describe-addon-configuration --addon-name vpc-cni
aws eks describe-addon-configuration --addon-name coredns

22. aws eks describe-addon-versions

Use Case:

Lists available add-on versions.

Description:

Shows available versions for EKS-managed add-ons.

Examples:

aws eks describe-addon-versions
aws eks describe-addon-versions --addon-name vpc-cni

23. aws eks describe-cluster

Use Case:

Describes an EKS cluster.

Description:

Provides detailed information about an EKS cluster.

Examples:

aws eks describe-cluster --name my-cluster
aws eks describe-cluster --name prod-cluster

24. aws eks describe-cluster-versions

Use Case:

Lists available Kubernetes versions for EKS.

Description:

Shows supported Kubernetes versions in AWS EKS.

Examples:

aws eks describe-addon-versions --query "addons[].compatibilities[].clusterVersion"

25. aws eks describe-eks-anywhere-subscription

Use Case:

Fetches details about EKS Anywhere subscription.

Description:

Shows information about on-premises Kubernetes subscription.

Examples:

aws eks describe-eks-anywhere-subscription --account-id 123456789012

26. aws eks describe-fargate-profile

Use Case:

Describes an EKS Fargate profile.

Description:

Displays details about a Fargate profile, including subnets and namespaces.

Examples:

aws eks describe-fargate-profile --cluster-name my-cluster --fargate-profile-name my-profile
aws eks describe-fargate-profile --cluster-name prod-cluster --fargate-profile-name backend-profile

Here’s the continuation of the AWS EKS CLI commands documentation with their use case, description, and examples.


AWS EKS CLI Commands (Continued)


27. aws eks describe-identity-provider-config

Use Case:

Retrieves details about an OIDC identity provider configuration.

Description:

Shows configuration details for an identity provider (IdP) integrated with EKS.

Examples:

aws eks describe-identity-provider-config --cluster-name my-cluster --identity-provider-config-name my-oidc-provider
aws eks describe-identity-provider-config --cluster-name prod-cluster --identity-provider-config-name enterprise-auth

28. aws eks describe-insight

Use Case:

Provides insights about EKS clusters.

Description:

Gives detailed insights about the cluster’s health, usage, and security.

Examples:

aws eks describe-insight --cluster-name my-cluster
aws eks describe-insight --cluster-name prod-cluster

29. aws eks describe-nodegroup

Use Case:

Gets details about an EKS managed node group.

Description:

Shows instance types, scaling details, and IAM roles for the specified node group.

Examples:

aws eks describe-nodegroup --cluster-name my-cluster --nodegroup-name worker-nodes
aws eks describe-nodegroup --cluster-name dev-cluster --nodegroup-name app-nodes

30. aws eks describe-pod-identity-association

Use Case:

Retrieves details about a pod identity association.

Description:

Shows information on IAM role associations with Kubernetes service accounts.

Examples:

aws eks describe-pod-identity-association --cluster-name my-cluster --service-account my-service-account --namespace default
aws eks describe-pod-identity-association --cluster-name prod-cluster --service-account api-service --namespace backend

31. aws eks describe-update

Use Case:

Shows details of an ongoing or completed EKS update.

Description:

Used to track cluster, node group, or add-on updates.

Examples:

aws eks describe-update --name my-cluster --update-id update-1234abcd
aws eks describe-update --name prod-cluster --nodegroup-name workers --update-id update-5678efgh

32. aws eks disassociate-access-policy

Use Case:

Removes an access policy from an EKS cluster.

Description:

Detaches an IAM access policy from an EKS cluster.

Examples:

aws eks disassociate-access-policy --cluster-name my-cluster --access-policy-arn arn:aws:iam::123456789012:policy/ReadOnlyAccess
aws eks disassociate-access-policy --cluster-name prod-cluster --access-policy-arn arn:aws:iam::123456789012:policy/AdminPolicy

33. aws eks disassociate-identity-provider-config

Use Case:

Removes an OIDC identity provider from an EKS cluster.

Description:

Disables authentication using an external identity provider.

Examples:

aws eks disassociate-identity-provider-config --cluster-name my-cluster --identity-provider-config-name oidc-auth
aws eks disassociate-identity-provider-config --cluster-name prod-cluster --identity-provider-config-name enterprise-oidc

34. aws eks get-token

Use Case:

Generates a temporary authentication token for accessing an EKS cluster.

Description:

Used to authenticate kubectl and other Kubernetes clients.

Examples:

aws eks get-token --cluster-name my-cluster
aws eks get-token --cluster-name prod-cluster --output json

35. aws eks help

Use Case:

Displays help documentation for AWS EKS CLI.

Description:

Provides detailed information about EKS commands.

Examples:

aws eks help
aws eks create-cluster help

36. aws eks list-access-entries

Use Case:

Lists all access entries in an EKS cluster.

Description:

Returns all users, roles, and policies granted access.

Examples:

aws eks list-access-entries --cluster-name my-cluster
aws eks list-access-entries --cluster-name prod-cluster --max-items 10

37. aws eks list-addons

Use Case:

Lists installed EKS add-ons.

Description:

Returns all installed add-ons such as CoreDNS and VPC CNI.

Examples:

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

38. aws eks list-clusters

Use Case:

Lists all EKS clusters in the account.

Description:

Returns all available clusters in the AWS account.

Examples:

aws eks list-clusters
aws eks list-clusters --region us-west-2

39. aws eks list-fargate-profiles

Use Case:

Lists all Fargate profiles for an EKS cluster.

Description:

Shows configured Fargate profiles for serverless workloads.

Examples:

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

40. aws eks register-cluster

Use Case:

Registers an external Kubernetes cluster with EKS.

Description:

Allows AWS to monitor and manage an on-premise Kubernetes cluster.

Examples:

aws eks register-cluster --name my-onprem-cluster --connector-config roleArn=arn:aws:iam::123456789012:role/ClusterConnectorRole
aws eks register-cluster --name hybrid-cluster --connector-config roleArn=arn:aws:iam::123456789012:role/HybridEKSRole

41. aws eks tag-resource

Use Case:

Adds tags to an EKS resource.

Description:

Used to manage resources by applying metadata tags.

Examples:

aws eks tag-resource --resource-arn arn:aws:eks:us-west-2:123456789012:cluster/my-cluster --tags Project=Dev
aws eks tag-resource --resource-arn arn:aws:eks:us-west-2:123456789012:nodegroup/prod-nodes --tags Environment=Production

42. aws eks update-cluster-version

Use Case:

Upgrades an EKS cluster to a new Kubernetes version.

Description:

Updates the control plane Kubernetes version.

Examples:

aws eks update-cluster-version --name my-cluster --kubernetes-version 1.27
aws eks update-cluster-version --name prod-cluster --kubernetes-version 1.28

43. aws eks wait

Use Case:

Waits until a specific EKS operation completes.

Description:

Pauses execution until a cluster, node group, or Fargate profile is created or deleted.

Examples:

aws eks wait cluster-active --name my-cluster
aws eks wait nodegroup-deleted --cluster-name prod-cluster --nodegroup-name prod-nodes

Here are the remaining AWS EKS CLI commands along with their use cases, descriptions, and examples.


AWS EKS CLI Commands (Final Set)


44. aws eks untag-resource

Use Case:

Removes tags from an EKS resource.

Description:

Used to delete specific tags from an EKS cluster, node group, or Fargate profile.

Examples:

aws eks untag-resource --resource-arn arn:aws:eks:us-west-2:123456789012:cluster/my-cluster --tag-keys Project
aws eks untag-resource --resource-arn arn:aws:eks:us-west-2:123456789012:nodegroup/prod-nodes --tag-keys Environment

45. aws eks update-access-entry

Use Case:

Modifies an access entry in an EKS cluster.

Description:

Used to update access permissions of an IAM user or role in EKS.

Examples:

aws eks update-access-entry --cluster-name my-cluster --principal-arn arn:aws:iam::123456789012:role/MyEKSIAMRole --kubernetes-groups new-group
aws eks update-access-entry --cluster-name prod-cluster --principal-arn arn:aws:iam::123456789012:user/DevUser --kubernetes-groups updated-group

46. aws eks update-addon

Use Case:

Upgrades an EKS add-on to a newer version.

Description:

Used to update add-ons like VPC CNI, CoreDNS, or kube-proxy.

Examples:

aws eks update-addon --cluster-name my-cluster --addon-name vpc-cni --addon-version latest
aws eks update-addon --cluster-name prod-cluster --addon-name coredns --resolve-conflicts OVERWRITE

47. aws eks update-cluster-config

Use Case:

Modifies an EKS cluster configuration.

Description:

Used to update networking, logging, and access settings.

Examples:

aws eks update-cluster-config --name my-cluster --resources-vpc-config subnetIds=subnet-abc123,securityGroupIds=sg-xyz789
aws eks update-cluster-config --name prod-cluster --logging '{"clusterLogging":[{"types":["api","audit"],"enabled":true}]}'

48. aws eks update-cluster-version

Use Case:

Upgrades an EKS cluster to a new Kubernetes version.

Description:

Used to upgrade the Kubernetes control plane.

Examples:

aws eks update-cluster-version --name my-cluster --kubernetes-version 1.28
aws eks update-cluster-version --name prod-cluster --kubernetes-version 1.29

49. aws eks update-eks-anywhere-subscription

Use Case:

Updates an EKS Anywhere subscription.

Description:

Used to modify the subscription settings for AWS EKS Anywhere.

Examples:

aws eks update-eks-anywhere-subscription --account-id 123456789012
aws eks update-eks-anywhere-subscription --account-id 987654321000

50. aws eks update-kubeconfig

Use Case:

Configures kubectl to connect to an EKS cluster.

Description:

Generates or updates the Kubernetes config file.

Examples:

aws eks update-kubeconfig --name my-cluster
aws eks update-kubeconfig --name prod-cluster --region us-west-2

51. aws eks update-nodegroup-config

Use Case:

Modifies the configuration of an EKS node group.

Description:

Used to update scaling parameters and instance types.

Examples:

aws eks update-nodegroup-config --cluster-name my-cluster --nodegroup-name workers --scaling-config minSize=1,maxSize=5,desiredSize=3
aws eks update-nodegroup-config --cluster-name prod-cluster --nodegroup-name backend-nodes --scaling-config minSize=2,maxSize=10,desiredSize=5

52. aws eks update-nodegroup-version

Use Case:

Upgrades the Kubernetes version of a node group.

Description:

Used to upgrade worker nodes to match the control plane.

Examples:

aws eks update-nodegroup-version --cluster-name my-cluster --nodegroup-name workers
aws eks update-nodegroup-version --cluster-name prod-cluster --nodegroup-name backend-nodes --force

53. aws eks update-pod-identity-association

Use Case:

Modifies the IAM role association for a Kubernetes service account.

Description:

Used to update an IAM role linked to a Kubernetes service account.

Examples:

aws eks update-pod-identity-association --cluster-name my-cluster --service-account api-service --namespace default --role-arn arn:aws:iam::123456789012:role/NewEKSRole
aws eks update-pod-identity-association --cluster-name prod-cluster --service-account backend-service --namespace backend --role-arn arn:aws:iam::123456789012:role/UpdatedRole

54. aws eks wait

Use Case:

Pauses execution until an EKS operation completes.

Description:

Used to wait for cluster creation, deletion, or node group operations.

Examples:

aws eks wait cluster-active --name my-cluster
aws eks wait nodegroup-deleted --cluster-name prod-cluster --nodegroup-name prod-nodes

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x