AWS · Containers & CI/CD

EKS Fundamentals

Amazon EKS is managed Kubernetes. AWS runs the control plane; you deploy workloads with standard Kubernetes tools.

Intermediate 5 min Lesson 20 of 30
0/30 in AWS
On this page · 5 min · Intermediate

Learning objectives#

  • Create a cluster with eksctl
  • Connect with kubectl
  • Compare managed node groups, Fargate and Auto Mode
  • Decide between EKS and ECS

Explanation#

EKS runs a highly available Kubernetes control plane for you. Workloads run on managed node groups (EC2), Fargate, or EKS Auto Mode, where AWS manages the nodes too.

eksctl is the simplest way to create clusters; kubectl deploys and inspects workloads.

Pods get AWS permissions through EKS Pod Identity or IAM roles for service accounts (IRSA) — never through node-wide keys.

Choose EKS when you need Kubernetes portability or its ecosystem; choose ECS for simpler AWS-native container hosting.

Code example: A small cluster#

ShellA small cluster Illustrative
eksctl create cluster --name shop --region ap-south-1 \
  --nodegroup-name default --node-type t3.medium --nodes 2


aws eks update-kubeconfig --name shop --region ap-south-1
kubectl get nodes
kubectl create deployment hello --image=nginx --replicas=2
kubectl expose deployment hello --type=LoadBalancer --port=80
Expected output
NAME                                          STATUS   ROLES    AGE   VERSION
ip-192-168-12-34.ap-south-1.compute.internal  Ready    <none>   3m    v1.3x.x
ip-192-168-56-78.ap-south-1.compute.internal  Ready    <none>   3m    v1.3x.x

This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.

Step-by-step explanation#

  1. eksctl creates the VPC, control plane and a managed node group.
  2. update-kubeconfig lets kubectl talk to the cluster.
  3. Two nodes are Ready.
  4. A Deployment and a LoadBalancer Service expose nginx publicly.

Real-world use case#

A company standardised on Kubernetes runs dozens of services with Helm charts, the same way on EKS as in other environments.

Common mistakes#

Forgetting control-plane cost

Each EKS cluster has an hourly charge in addition to nodes. Delete learning clusters: eksctl delete cluster --name shop.

Giving nodes broad IAM permissions

Use Pod Identity or IRSA so each workload has its own role.

Best practices#

  • Use managed node groups or Auto Mode
  • Per-pod IAM with Pod Identity
  • Keep clusters on supported Kubernetes versions
  • Use infrastructure as code for clusters

Remember this#

EKS = AWS runs the Kubernetes control plane.

eksctl creates; kubectl deploys.

Simpler needs → ECS. Kubernetes needs → EKS.

Practice exercise#

Your task: Delete the learning cluster to stop charges.

Show solution
Shell Illustrative
eksctl delete cluster --name shop --region ap-south-1

Mini quiz#

EKS Fundamentals quizMultiple choice Question 1 of 1

How should a pod get permission to read from S3 on EKS?

Score so far: 0/0

Want more? Practise all AWS MCQs · AWS interview questions

My notes#

Saved in this browser.

Progress is saved in this browser. Sign in to sync.