hands-on
0% complete
Level 0

AWS EKS: From Absolute Beginner to Expert

This guide assumes you know nothing about containers, Kubernetes, or EKS. Each tab builds on the one before it. By the end you will be able to build an EKS cluster, store images in ECR, deploy apps, add the common add-ons, patch nodes, and upgrade a cluster safely.

๐ŸŸข Level 1 โ€” Foundations
Containers, Kubernetes, what EKS is
๐Ÿ”ต Level 2 โ€” First Cluster
Tools, create a cluster, console tour
๐ŸŸก Level 3 โ€” Run Apps
Compute, ECR, deploy, networking, storage
๐ŸŸฃ Level 4 โ€” Operate
Security, add-ons, monitoring, patching
๐Ÿ”ด Level 5 โ€” Expert
Upgrades, Auto Mode, troubleshooting

How to use this tutorial

๐Ÿ“‘ Levels, lessons & parts

Pick a level in the top row, then a lesson in the second row. Each lesson is split into short numbered parts. The Next โ†’ button at the bottom always tells you where it goes next.

โœ… Progress

Parts you have visited get a green number. A lesson is marked complete when you finish its last part, or when you click Mark complete. The bar at the top shows your overall progress.

๐Ÿ–ฅ๏ธ Terminals

Black boxes are command windows. Lines starting with $ are commands you type. Grey lines are what the computer prints back. Use Copy to copy commands.

โ–ถ๏ธ Walkthroughs

Some terminals have a โ–ถ Run step button. Click it to see each numbered step: the command, its output and what it means. Prefer to read it all at once? Click Show all steps.

๐Ÿ–ฑ๏ธ Diagrams

Click parts of the diagrams to learn what each piece does.

โ“ Review & quiz

The last part of each lesson has the key takeaways and a short quiz. Click an answer to check yourself.
This tutorial was checked against the AWS documentation in November 2026. At that time, EKS offered Kubernetes versions 1.34โ€“1.37 on standard support and 1.31โ€“1.33 on extended support. AWS changes the console often, so button names may differ slightly from what you see here. Example account IDs (111122223333) and names (demo) are placeholders โ€” swap in your own.
EKS is not free. A cluster costs money every hour it runs (see the "What is EKS?" tab), and so do the EC2 servers and load balancers it creates. Delete practice clusters when you are done. Each way of building a cluster has a red ๐Ÿงน Teardown box right after it: Auto Mode and Standard on the First Cluster page, and the console-built cluster on the Console Tour page. Finish with the leftover check on the Expert Ops page.
Level 1 ยท Foundations

Containers 101

You will learn: what an app needs to run, what a container is, what an image is, and why everyone uses them.

The problem containers solve

An app is more than its code. It also needs the right language version, libraries, and settings. When you move an app from your laptop to a server, something is often missing, and the app breaks. People call this the "it works on my machine" problem.

A container is like a lunchbox. You pack the food (your code) and the fork, napkin, and sauce (libraries and settings) together. Wherever the lunchbox goes, everything needed is inside.

Three words to know

๐Ÿ“„ Dockerfile

A recipe. A text file with step-by-step instructions to build your app's package.

๐Ÿ“ฆ Image

The packed lunchbox, sealed and ready. Built from the Dockerfile. It never changes once built. It has a name and a tag (a version label like 1.0).

๐Ÿƒ Container

A running copy of an image. You can run many containers from one image, like printing many copies of one photo.
Dockerfile
โ†’ build โ†’
Image
โ†’ push โ†’
Registry (ECR)
โ†’ pull & run โ†’
Container

A tiny example

Dockerfile
# Start from a small official image that already has a web server
FROM public.ecr.aws/nginx/nginx:stable-alpine
# Copy our web page into the place nginx serves files from
COPY index.html /usr/share/nginx/html/index.html
# Tell people this container listens on port 80
EXPOSE 80
Walkthrough: build and run on your laptop
docker build -t hello-app:1.0 .
[+] Building 3.1s (7/7) FINISHED
 => [1/2] FROM public.ecr.aws/nginx/nginx:stable-alpine
 => [2/2] COPY index.html /usr/share/nginx/html/index.html
 => naming to docker.io/library/hello-app:1.0
What happened: Docker read the Dockerfile in this folder (.) and built an image named hello-app with tag 1.0.
docker images hello-app
REPOSITORY   TAG   IMAGE ID       CREATED          SIZE
hello-app    1.0   3f2a9c1d7b44   10 seconds ago   48MB
What happened: We listed our images. The image now exists on your computer.
docker run -d -p 8080:80 --name web hello-app:1.0
a81c0f3b2e6d9c5e1f7a...
What happened: We started a container. -d runs it in the background. -p 8080:80 connects port 8080 on your laptop to port 80 inside the container. Open http://localhost:8080 to see your page.
docker ps
CONTAINER ID   IMAGE           STATUS         PORTS                  NAMES
a81c0f3b2e6d   hello-app:1.0   Up 5 seconds   0.0.0.0:8080->80/tcp   web
What happened: docker ps lists running containers. Ours is "Up". Stop it with docker rm -f web.

Why one container is not enough

Running one container on one laptop is easy. Real apps need many containers on many servers. Someone must decide where each container runs, restart it if it crashes, add more when traffic grows, and connect them to the internet. Doing this by hand is impossible at scale. That job is called orchestration, and Kubernetes is the most popular tool for it. That is the next tab.

Key takeaways

  • A container packs your app with everything it needs.
  • An image is the sealed package; a container is a running copy of it.
  • Images are stored in a registry. On AWS, that is Amazon ECR.
  • Kubernetes manages lots of containers across lots of servers.
Level 1 ยท Foundations

Kubernetes 101

You will learn: the main Kubernetes parts (cluster, node, pod, deployment, service, namespace), how Kubernetes "keeps things the way you asked," and how scaling works.
Kubernetes is like a restaurant manager. You tell the manager, "I always want 3 cooks making pizza." The manager hires them, puts them in kitchens with free space, and if a cook goes home sick, hires a new one right away. You describe what you want; the manager makes it true and keeps it true.

The building blocks

WordSimple meaningRestaurant version
ClusterThe whole Kubernetes system: a brain plus the servers it controls.The whole restaurant chain
Control planeThe brain. It stores what you asked for and makes decisions.The head office
NodeOne server (computer) that runs your containers. On AWS, usually an EC2 instance.One kitchen
PodThe smallest thing Kubernetes runs. A wrapper around one (sometimes more) containers. Each pod gets its own IP address.One cook
DeploymentSays "run N copies of this pod, and update them safely.""Always keep 3 pizza cooks"
ReplicaSetCreated by a Deployment. Makes sure the right number of pods exist.The shift supervisor
ServiceA stable name and address in front of a group of pods. Pods come and go; the Service stays.The restaurant's phone number
IngressRules for sending web traffic from the internet to Services (by website path or domain name).The front-door host
NamespaceA folder to group things, like dev and prod.Separate floors of the building
ConfigMap / SecretSettings / passwords given to pods.The recipe card / the safe code
DaemonSetRuns exactly one pod on every node (good for log or monitoring agents).One cleaner in every kitchen
PersistentVolume (PV) / Claim (PVC)Disk storage that survives when a pod restarts.A storage locker

Desired state: the big idea

You write a file (in a format called YAML) that describes what you want. You send it to the cluster with a tool called kubectl. Kubernetes keeps comparing "what you asked for" with "what is really running" and fixes any difference. This is called the reconcile loop.

๐Ÿ“ You write YAML
"3 copies of my app"
โ†’
๐Ÿง  Control plane saves it
โ†’
๐Ÿ‘€ Controllers compare
wanted vs. real
โ†’
๐Ÿ”ง Fix the difference
start/stop pods
โ†บ

Your first YAML, line by line

deployment.yaml
apiVersion: apps/v1          # which Kubernetes API "type family" this belongs to
kind: Deployment             # what we are creating
metadata:
  name: hello                # its name
spec:
  replicas: 3                # I want 3 copies (pods)
  selector:
    matchLabels: { app: hello }   # manage pods that have the label app=hello
  template:                  # the pod "cookie cutter"
    metadata:
      labels: { app: hello } # stamp this label on every pod
    spec:
      containers:
      - name: web
        image: public.ecr.aws/nginx/nginx:stable-alpine  # which image to run
        ports:
        - containerPort: 80

๐ŸŽฎ Interactive: scaling simulator

Move the slider to change how many pod copies (replicas) you want. Each node here fits 4 pods. Turn the autoscaler on and off to see what happens when nodes are full.

Kubernetes placed 3 pods on 1 node.

Two kinds of scaling

Pod scaling (more copies)

The Horizontal Pod Autoscaler (HPA) adds or removes pods based on CPU or memory use. It needs the Metrics Server add-on.

Node scaling (more servers)

When pods have nowhere to fit, they are Pending. A node autoscaler (Karpenter, Cluster Autoscaler, or EKS Auto Mode) adds servers, and removes empty ones later.

Key takeaways

  • You describe the desired state in YAML; Kubernetes makes it real and keeps it real.
  • Pods run on nodes. Deployments keep the right number of pods. Services give them a stable address.
  • Pod scaling and node scaling are different jobs done by different tools.
Level 1 ยท Foundations

What is Amazon EKS?

You will learn: what AWS does for you in EKS, what you still own, how an EKS cluster sits inside your AWS account, the cost, and how Kubernetes versions work on EKS.

Amazon EKS (Elastic Kubernetes Service) is Kubernetes run by AWS. Running the Kubernetes "brain" (control plane) yourself is hard: it must be backed up, patched, and kept highly available. With EKS, AWS runs the brain for you across several data centers. You focus on your apps and (unless you use Auto Mode) your worker nodes.

๐Ÿ–ฑ๏ธ Interactive architecture diagram

Click any box to learn what it is.

AWS Cloud EKS Control Plane (AWS-managed) API server etcd (data) Scheduler Controllers Runs in 3+ Availability Zones ๐Ÿ‘ฉโ€๐Ÿ’ป You: kubectl / Console / CI Signs in with AWS IAM Your VPC (your network) Availability Zone A Availability Zone B EC2 worker node pod pod pod kubelet ยท containerd ยท kube-proxy ยท CNI EC2 worker node pod pod kubelet ยท containerd ยท kube-proxy ยท CNI ๐Ÿ’พ EBS volume (disk) ๐Ÿ“ EFS (shared files) โš–๏ธ Load Balancer (ALB / NLB) ๐Ÿ“ฆ Amazon ECR ๐Ÿ” IAM
๐Ÿ‘† Click a box in the diagram.

Who does what? (shared responsibility)

Pick a tab to see who looks after each layer of an EKS cluster. Orange layers are run by AWS, blue layers are yours, and yellow layers are shared. The dashed line marks where AWS's job ends and yours begins. The table below the diagram lists the same thing.

TaskStandard EKSEKS Auto Mode
Run, patch, and back up the control planeAWSAWS
Choose, launch, and scale worker nodesYou (with tools)AWS
Patch the node operating systemYou (replace AMIs)AWS
Install/upgrade core add-ons (networking, DNS, storage driver, LB controller)YouAWS (built in)
Upgrade Kubernetes versionYou start itYou start it (nodes follow)
Your apps, images, YAML, IAM permissions, dataYouYou

What does it cost?

  • Control plane: $0.10 per cluster per hour while the version is in standard support; $0.60 per cluster per hour in extended support (about $73/month vs. $438/month).
  • Worker nodes: normal EC2 prices (or Fargate prices).
  • Auto Mode: an extra management fee per instance it manages, on top of the EC2 price. EC2 discounts (Savings Plans, Spot) do not reduce this fee.
  • Other: load balancers, EBS disks, NAT gateways, data transfer, CloudWatch logs.

Kubernetes versions on EKS

Kubernetes ships a new minor version (like 1.36 โ†’ 1.37) about every four months. On EKS, each version gets 14 months of standard support, then 12 months of extended support (at the higher price). After that, AWS upgrades the control plane for you automatically.

VersionEKS releaseEnd of standard supportEnd of extended support
1.37Oct 1, 2026Dec 1, 2027Dec 1, 2028
1.36Jun 2, 2026Aug 2, 2027Aug 2, 2028
1.35Jan 27, 2026Mar 27, 2027Mar 27, 2028
1.34Oct 2, 2025Dec 2, 2026Dec 2, 2027
1.33May 29, 2025Jul 29, 2026 (now extended)Jul 29, 2027
1.32Jan 23, 2025Mar 23, 2026 (now extended)Mar 23, 2027
1.31Sep 26, 2024Nov 26, 2025 (now extended)Nov 26, 2026
1.34 leaves standard support on Dec 2, 2026, and 1.31 leaves extended support on Nov 26, 2026. If you run these versions, plan your upgrade now. Check the live table any time with aws eks describe-cluster-versions.

There is also a platform version (like eks.12). AWS bumps this automatically for small fixes and security patches to the control plane. You do not need to do anything for it.

Key takeaways

  • EKS = Kubernetes where AWS runs the brain.
  • Your nodes and pods live in your VPC, spread across Availability Zones.
  • Stay on a version in standard support to save money and stay safe.
Level 2 ยท First Cluster

Tools & Setup

You will learn: the four command-line tools you need, how to install them, and how to sign in to AWS.

โ˜๏ธ AWS CLI (aws)

Talks to AWS services. Creates clusters, ECR repos, IAM roles, add-ons.

โ˜ธ๏ธ kubectl

Talks to Kubernetes inside your cluster. Creates pods, services, and reads logs. Use a version within one minor version of your cluster.

๐Ÿ› ๏ธ eksctl

A helper that builds a full EKS cluster (VPC, roles, nodes) with one command. Made with AWS for EKS.

โ›ต Helm

A "package manager" for Kubernetes. Installs apps like the AWS Load Balancer Controller from a "chart."

Also install Docker (or another container builder like Finch or Podman) to build images.

Install (Linux / macOS examples)

install-tools.sh
# --- AWS CLI v2 (Linux x86_64) ---
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
unzip awscliv2.zip && sudo ./aws/install
# macOS (Homebrew) alternative: brew install awscli kubectl eksctl helm

# --- kubectl (match your cluster's minor version) ---
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -m 0755 kubectl /usr/local/bin/kubectl

# --- eksctl ---
curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz"
tar -xzf eksctl_$(uname -s)_amd64.tar.gz -C /tmp && sudo mv /tmp/eksctl /usr/local/bin

# --- Helm ---
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Always check each tool's official install page for the newest command โ€” links are in the Sources tab. Windows users can use winget or choco.

โ–ถ๏ธ Walkthrough: sign in and check everything

Terminal
aws configure sso
SSO session name (Recommended): my-sso
SSO start URL [None]: https://my-company.awsapps.com/start
SSO region [None]: us-west-2
...
CLI default client Region [None]: us-west-2
CLI profile name [AdministratorAccess-111122223333]: eks-admin
Why: This signs you in with IAM Identity Center (SSO), which gives short-lived keys. This is safer than long-lived access keys. (If you only have access keys, use aws configure.)
export AWS_PROFILE=eks-admin
aws sts get-caller-identity
{
    "UserId": "AROAEXAMPLEID:alex",
    "Account": "111122223333",
    "Arn": "arn:aws:sts::111122223333:assumed-role/AWSReservedSSO_AdministratorAccess_abc123/alex"
}
Why: "Who am I?" This proves you are signed in and shows the account and role. Remember this ARN โ€” the identity that creates a cluster becomes its first admin.
kubectl version --client
Client Version: v1.37.x
Kustomize Version: v5.x
eksctl version
0.2xx.0
helm version --short
v3.x.x
Why: Confirms each tool is installed. Your exact numbers will differ.
aws eks describe-cluster-versions --query "clusterVersions[].[clusterVersion,versionStatus]" --output table
------------------------------------
|      DescribeClusterVersions     |
+-------+--------------------------+
|  1.37 |  STANDARD_SUPPORT        |
|  1.36 |  STANDARD_SUPPORT        |
|  1.35 |  STANDARD_SUPPORT        |
|  1.34 |  STANDARD_SUPPORT        |
|  1.33 |  EXTENDED_SUPPORT        |
|  ...  |  ...                     |
+-------+--------------------------+
Why: Shows which Kubernetes versions you can pick right now. --query trims the output; --output table makes it readable.
Use one AWS Region for all practice work (this guide uses us-west-2). Most "I can't find my cluster" problems are a wrong Region.

Key takeaways

  • aws talks to AWS; kubectl talks to Kubernetes; eksctl builds clusters; helm installs packages.
  • Sign in with SSO and check with aws sts get-caller-identity.
Level 2 ยท First Cluster

Create Your First Cluster

You will learn: three ways to create a cluster, how to connect kubectl to it, and how to look around.

Three ways to build

Suggested route through this lesson: Part 2 (build an Auto Mode cluster) โ†’ Part 3 (practice reaching your app) โ†’ Part 6 (tear it down). Parts 4 and 5 are optional extras: a standard cluster with node groups, and how to connect kubectl to any cluster.

1. eksctl (easiest)

One command builds the VPC, IAM roles, cluster, and nodes. Great for learning.

2. AWS Console

Click through screens. Good to see every setting (see the Console Tour tab).

3. Infrastructure as Code

Terraform, CloudFormation, or CDK. Best for real teams: repeatable and reviewed.

Option A: Auto Mode cluster (recommended for beginners)

Walkthrough: create an Auto Mode cluster with eksctl
eksctl create cluster --name demo --region us-west-2 --enable-auto-mode
[โ„น]  eksctl version 0.2xx.0
[โ„น]  using region us-west-2
[โ„น]  subnets for us-west-2a - public:192.168.0.0/19 private:192.168.96.0/19
[โ„น]  subnets for us-west-2b - public:192.168.32.0/19 private:192.168.128.0/19
[โ„น]  subnets for us-west-2c - public:192.168.64.0/19 private:192.168.160.0/19
[โ„น]  using Kubernetes version 1.37
[โ„น]  creating EKS cluster "demo" in "us-west-2" region with Auto Mode
[โ„น]  building cluster stack "eksctl-demo-cluster"
[โ„น]  waiting for CloudFormation stack "eksctl-demo-cluster"
...
[โœ”]  saved kubeconfig as "/home/alex/.kube/config"
[โœ”]  EKS cluster "demo" in "us-west-2" region is ready
What happened (about 15 minutes): eksctl made a new VPC with public and private subnets in 3 AZs, created IAM roles, built the control plane with Auto Mode on, and saved connection details to ~/.kube/config. Auto Mode will create nodes only when you deploy pods.
kubectl get nodes
No resources found
Why no nodes? Auto Mode does not keep idle servers. Nodes appear when a pod needs somewhere to run. This saves money.
kubectl create deployment hello --image=public.ecr.aws/nginx/nginx:stable-alpine --replicas=2
deployment.apps/hello created
kubectl get pods -w
NAME                     READY   STATUS    RESTARTS   AGE
hello-6b8f7d9c5d-4kq2x   0/1     Pending   0          2s
hello-6b8f7d9c5d-r7m9z   0/1     Pending   0          2s
hello-6b8f7d9c5d-4kq2x   0/1     ContainerCreating   0   48s
hello-6b8f7d9c5d-4kq2x   1/1     Running             0   55s
hello-6b8f7d9c5d-r7m9z   1/1     Running             0   56s
What happened: Pods start Pending (no node). Auto Mode sees this and launches an EC2 instance (~45โ€“60 s). Then pods move to Running. -w means "watch" โ€” press Ctrl+C to stop.
kubectl get nodes -o wide
NAME                  STATUS   ROLES    AGE   VERSION               INTERNAL-IP     OS-IMAGE
i-0a1b2c3d4e5f67890   Ready    <none>   70s   v1.37.x-eks-xxxxxxx   192.168.110.7   Bottlerocket (EKS Auto, Standard) ...
What you see: A node named after its EC2 instance ID, running a locked-down Bottlerocket-based OS managed by AWS.

๐Ÿงช Practice lab: reach your app 3 ways (and undo each one)

Your hello deployment is running, but nothing can reach it yet. Here are the three common ways to see the nginx page. For each one you'll do it โ†’ check it โ†’ undo it โ†’ check it's gone, so you can practice them as often as you like without leaving anything behind.

WayWho can reach the appCreates AWS resources?Use it for
1. Port-forwardOnly you, on your own computerNo: freeQuick personal checks and debugging
2. Internal Service (ClusterIP)Other pods inside the clusterNo: freeApp-to-app traffic (frontend โ†’ backend)
3. Public load balancerAnyone on the internetYes: an NLB, billed hourlyReal users
Examples use us-west-2. If your cluster is in another Region (for example GovCloud us-gov-west-1), swap in your Region. If the public.ecr.aws/... image gives InvalidImageName, the image name was probably mangled when you copied it. Retype it, or use --image=nginx:alpine (from Docker Hub) for practice.

Lab 1: Port-forward (a private tunnel from your laptop)

Lab 1: do, check, undo, check
kubectl port-forward deployment/hello 8080:80
Forwarding from 127.0.0.1:8080 -> 80
Forwarding from [::1]:8080 -> 80
Do it (terminal 1). This opens a tunnel from port 8080 on your computer to port 80 of one hello pod. The command keeps running: the tunnel only exists while it runs. Leave it open.
curl -s http://localhost:8080 | grep title
<title>Welcome to nginx!</title>
Check it (terminal 2). You reach nginx through the tunnel. You can also open http://localhost:8080 in a browser.
# In terminal 1, press Ctrl+C
# Started it in the background with "&" instead? Use one of these:
kill %1                                    # same terminal session
pkill -f "port-forward deployment/hello"   # from any terminal (macOS/Linux)
Undo it. Stopping the command closes the tunnel. Nothing was created in the cluster or in AWS, so there is nothing else to clean up.
curl -s http://localhost:8080
curl: (7) Failed to connect to localhost port 8080: Connection refused
Check it's gone. "Connection refused" means nothing is listening on port 8080 any more.

Lab 2: Internal Service + test from inside the cluster

Lab 2: do, check, undo, check
kubectl expose deployment hello --port=80
kubectl get svc hello
service/hello exposed
NAME    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
hello   ClusterIP   10.100.57.201   <none>        80/TCP    5s
Do it. expose creates a Service named hello in front of the pods with label app=hello. Type ClusterIP means it has an internal address only: no load balancer, no cost. CoreDNS also gives it the name hello.
kubectl run curltest --rm -it --image=curlimages/curl --restart=Never -- curl -s http://hello
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
...
pod "curltest" deleted
Check it. This starts a throwaway pod that has curl, fetches http://hello the same way another app in the cluster would, prints the page, and deletes itself. The breakdown below explains every part of the command.
kubectl delete svc hello
kubectl delete pod curltest --ignore-not-found
service "hello" deleted
Undo it. Delete the Service. The second command only matters if the test pod was interrupted (for example, you pressed Ctrl+C) and didn't clean itself up. --ignore-not-found keeps it quiet if the pod is already gone.
kubectl get svc hello
kubectl get pod curltest
Error from server (NotFound): services "hello" not found
Error from server (NotFound): pods "curltest" not found
Check it's gone. NotFound for both means you're back to just the deployment. The hello pods were never touched.

Lab 3: Public load balancer (reachable from the internet)

This creates a real AWS Network Load Balancer that bills by the hour and is open to the internet. Finish the undo steps when you're done. In GovCloud or company accounts, check that public load balancers are allowed.

On Auto Mode, use a small YAML file instead of kubectl expose --type=LoadBalancer. expose can't set loadBalancerClass, the field that tells Auto Mode to build the load balancer. Without it, an older built-in controller may create a different (Classic) load balancer instead.

Lab 3: do, check, undo, check
cat > hello-lb.yaml <<'EOF'
apiVersion: v1
kind: Service
metadata:
  name: hello-lb
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
spec:
  type: LoadBalancer
  loadBalancerClass: eks.amazonaws.com/nlb
  selector:
    app: hello
  ports:
  - port: 80
    targetPort: 80
EOF
kubectl apply -f hello-lb.yaml
service/hello-lb created
Do it. type: LoadBalancer asks for an outside address. loadBalancerClass: eks.amazonaws.com/nlb tells Auto Mode to build an NLB. The annotation makes it internet-facing; the default is internal, reachable only inside the VPC. selector sends traffic to pods labeled app=hello. (Standard clusters with the AWS Load Balancer Controller use service.k8s.aws/nlb instead.)
kubectl get svc hello-lb -w
NAME       TYPE           CLUSTER-IP     EXTERNAL-IP                                                   PORT(S)
hello-lb   LoadBalancer   10.100.12.88   <pending>                                                     80:31234/TCP
hello-lb   LoadBalancer   10.100.12.88   k8s-default-hellolb-1a2b3c4d5e-0123456789abcdef.elb.us-west-2.amazonaws.com   80:31234/TCP
Wait for the address. EXTERNAL-IP shows <pending> while AWS builds the NLB (2โ€“3 minutes), then the NLB's hostname. Press Ctrl+C to stop watching.
LB=$(kubectl get svc hello-lb -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
curl -s http://$LB | grep title
aws elbv2 describe-load-balancers --region us-west-2 --query "LoadBalancers[].[LoadBalancerName,Type,State.Code]" --output table
<title>Welcome to nginx!</title>
-----------------------------------------------------
|               DescribeLoadBalancers               |
+--------------------------------+---------+--------+
|  k8s-default-hellolb-1a2b3c4d5e |  network|  active|
+--------------------------------+---------+--------+
Check it. The first line saves the hostname into a variable, and curl fetches the page over the internet. The AWS command shows the real NLB (name starts with k8s-). If curl fails at first, wait a minute for DNS and health checks.
kubectl delete -f hello-lb.yaml
service "hello-lb" deleted
Undo it. Always delete the Service, not the load balancer in the AWS console. Deleting the Service tells Auto Mode to remove the NLB, its target groups and its security group rules. If you delete only the NLB in the console, Kubernetes still wants it and recreates it.
kubectl get svc hello-lb
aws elbv2 describe-load-balancers --region us-west-2 --query "LoadBalancers[].[LoadBalancerName,Type,State.Code]" --output table
rm hello-lb.yaml
Error from server (NotFound): services "hello-lb" not found
(no k8s-... load balancer listed)
Check it's gone (allow 1โ€“2 minutes). Kubernetes says NotFound and AWS no longer lists the k8s-... NLB, so billing for it has stopped. rm removes the local file (optional).

๐Ÿ” Breakdown: kubectl run curltest --rm -it ...

Click each part of the command to see what it does.

๐Ÿ‘† Click a part of the command.
PartWhat it means
kubectl runCreate and start a single pod (not a Deployment).
curltestThe pod's name. Any name works.
--rmDelete the pod automatically when the command finishes, so nothing is left behind.
-it-i (interactive) keeps the pod's input connected to your terminal. -t (tty) gives it a proper terminal. Together they show the output in your terminal and let --rm clean up when it ends.
--image=curlimages/curlThe container image to run: a tiny Docker Hub image that contains the curl tool. nginx isn't meant for testing, so you bring a separate tool.
--restart=NeverRun once. Without it, Kubernetes would restart the pod after curl exits, as if it had crashed.
--The divider: everything before it is for kubectl; everything after it is the command run inside the container.
curlThe tool that fetches a web page.
-sSilent: hide curl's progress meter and show only the page.
http://helloThe address: the hello Service. CoreDNS turns the name into the Service's internal IP, and the Service forwards to an nginx pod. From another namespace use hello.default or hello.default.svc.cluster.local.

What happens, in order:

1. kubectl asks for pod curltest
โ†’
2. A node pulls curlimages/curl
โ†’
3. Container runs curl -s http://hello
โ†’
4. DNS โ†’ Service IP โ†’ an nginx pod
โ†’
5. Page prints in your terminal
โ†’
6. curl exits; --rm deletes the pod

Compared with port-forward, this test proves more: pod-to-pod networking, DNS and the Service all work, which is the same path your other apps would use.

Useful variations
# Open a shell in the test pod and try several commands by hand (type "exit" to leave)
kubectl run curltest --rm -it --image=curlimages/curl --restart=Never -- sh
# Show only the response headers
kubectl run curltest --rm -it --image=curlimages/curl --restart=Never -- curl -sI http://hello
# Reach a Service in another namespace
kubectl run curltest --rm -it --image=curlimages/curl --restart=Never -- curl -s http://hello.shop.svc.cluster.local
# Clean up a test pod that didn't delete itself (e.g., after Ctrl+C)
kubectl delete pod curltest --ignore-not-found

Lab takeaways

  • Port-forward = just you, free, gone when you press Ctrl+C.
  • ClusterIP Service = inside the cluster only, free. Undo with kubectl delete svc.
  • LoadBalancer Service = public, billed hourly. Always undo by deleting the Service, then confirm in AWS.

Option B: Standard cluster with a managed node group

For full control, describe the cluster in a config file. This is the "standard" way most existing EKS clusters are built.

cluster.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: demo-std
  region: us-west-2
  version: "1.36"                 # older on purpose so we can practice upgrading later
iam:
  withOIDC: true                  # needed only if you use IRSA
addons:                           # install core add-ons as EKS-managed add-ons
  - name: vpc-cni
  - name: coredns
  - name: kube-proxy
  - name: eks-pod-identity-agent
  - name: aws-ebs-csi-driver
    useDefaultPodIdentityAssociations: true
  - name: metrics-server
managedNodeGroups:
  - name: ng-general
    amiFamily: AmazonLinux2023    # AL2023 or Bottlerocket (AL2 is retired)
    instanceTypes: ["m6i.large", "m7i.large"]
    minSize: 2
    desiredCapacity: 2
    maxSize: 5
    volumeSize: 50                # GiB root disk
    privateNetworking: true       # nodes in private subnets (safer)
    labels: { team: platform }
    updateConfig:
      maxUnavailable: 1           # replace 1 node at a time during patching
Run it: eksctl create cluster -f cluster.yaml. This takes about 15โ€“20 minutes.

Connect kubectl to any cluster

If you built the cluster another way (console, Terraform), tell kubectl how to reach it:

Terminal
aws eks update-kubeconfig --region us-west-2 --name demo
Added new context arn:aws:eks:us-west-2:111122223333:cluster/demo to /home/alex/.kube/config
kubectl config get-contexts
CURRENT   NAME                                              CLUSTER   ...
*         arn:aws:eks:us-west-2:111122223333:cluster/demo   ...
kubectl get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   20m
  1. update-kubeconfig writes the cluster address and an auth command into ~/.kube/config.
  2. A context = which cluster + which user. The * marks the active one. Switch with kubectl config use-context NAME.
  3. Seeing the kubernetes service proves you are connected.
"error: You must be logged in to the server (Unauthorized)" means your IAM identity has no access entry in this cluster. Only the creator gets admin by default. See the Security tab.

Your kubectl cheat sheet

A short starter list. The full, searchable list (including "who am I?" checks) is on the Command Reference page.

CommandWhat it does
kubectl get pods -AList pods in all namespaces
kubectl get deploy,svc,ing -n NAMESPACEList several kinds of things at once
kubectl describe pod NAMEFull details + recent Events (best for debugging)
kubectl logs NAME [-f] [--previous]App output; -f follows live, --previous shows the crashed copy
kubectl exec -it NAME -- shOpen a shell inside a container
kubectl apply -f file.yamlCreate or update from a file
kubectl delete -f file.yamlDelete what the file describes
kubectl get events --sort-by=.lastTimestampRecent cluster events, newest last
kubectl top nodes / podsCPU & memory use (needs Metrics Server)
kubectl explain deployment.specBuilt-in docs for any field

๐Ÿงน Teardown A: Auto Mode cluster (demo)

Did the practice lab? Make sure Lab 3's load balancer is gone first (kubectl get svc hello-lb should say NotFound). Deleting an Auto Mode cluster also deletes its load balancers, but undoing it yourself is good practice.

This scenario created only two things: the cluster (via eksctl) and the hello deployment. eksctl tracks everything it built (VPC, subnets, NAT gateway, IAM roles, control plane) and deletes all of it in reverse. Deleting an Auto Mode cluster also deletes the Auto Mode nodes, so one command is enough.

Walkthrough: tear down the Auto Mode cluster
eksctl delete cluster --name demo --region us-west-2 --wait
[โ„น]  deleting EKS cluster "demo"
[โœ”]  kubeconfig has been updated
[โ„น]  cleaning up AWS load balancers created by Kubernetes objects of Kind Service or Ingress
[โ„น]  deleting stack "eksctl-demo-cluster"
...
[โœ”]  all cluster resources were deleted
Delete everything. This removes the hello pods, the Auto Mode EC2 nodes, the control plane, and the CloudFormation stack eksctl made (VPC, subnets, NAT gateway, IAM roles). --wait keeps the command running until it's all gone (about 10โ€“15 minutes). The "cleaning up load balancers" line always appears; for this scenario there are none to remove.
aws eks list-clusters --region us-west-2
{ "clusters": [] }
aws cloudformation list-stacks --region us-west-2 --stack-status-filter DELETE_FAILED --query "StackSummaries[].StackName"
[]
Confirm. No clusters and no failed stacks means nothing from this scenario is still billing. Done!
Did you keep using this cluster for the Level 3โ€“5 lessons? Expand for extra steps.

Later lessons add things eksctl doesn't know about. Delete these before running eksctl delete cluster, and skip any you didn't create:

Only for things you added in later lessons
kubectl delete svc hello-lb --ignore-not-found    # Practice lab 3: NLB
kubectl delete ingress --all -A                  # Networking lesson: ALBs
kubectl delete svc -n shop hello-nlb             # Networking lesson: NLB
kubectl delete pvc --all -A                      # Storage lesson: EBS volumes
kubectl delete nodepool spot-graviton            # Compute lesson: custom NodePool
aws logs delete-log-group --log-group-name /aws/eks/demo/cluster   # Monitoring lesson: only if you turned on control plane logging

The ECR repository and any IAM roles you created by hand are covered in the leftover check.

๐Ÿงน Teardown B: Standard cluster (demo-std)

This scenario created only what's in cluster.yaml: the VPC, the cluster, the managed node group, the EKS add-ons and their Pod Identity roles, and the OIDC provider. eksctl made all of it, so one command deletes all of it. Use the same file you created the cluster with.

Walkthrough: tear down the standard cluster
eksctl delete cluster -f cluster.yaml --wait
[โ„น]  deleting EKS cluster "demo-std"
[โœ”]  kubeconfig has been updated
[โ„น]  cleaning up AWS load balancers created by Kubernetes objects of Kind Service or Ingress
[โ„น]  will delete stack "eksctl-demo-std-nodegroup-ng-general"
[โ„น]  will delete stack "eksctl-demo-std-cluster"
...
[โœ”]  all cluster resources were deleted
Delete everything. eksctl removes the node group and its EC2 instances, the add-ons and their IAM roles, the OIDC provider, the control plane, and the VPC + NAT gateway stack. This takes about 15 minutes.
aws eks list-clusters --region us-west-2
{ "clusters": [] }
aws cloudformation list-stacks --region us-west-2 --stack-status-filter DELETE_FAILED --query "StackSummaries[].StackName"
[]
Confirm. No clusters and no failed stacks means you're done.
Did you keep using this cluster for the Level 3โ€“5 lessons? Expand for extra steps.

Later lessons add things eksctl doesn't track. Order matters: delete load balancers and volumes while the AWS Load Balancer Controller and EBS CSI driver are still running, because they're what remove the AWS resources. Then run the eksctl command above. Skip anything you didn't create.

Only for things you added in later lessons
kubectl delete ingress --all -A                       # Networking lesson: ALBs
kubectl get svc -A --field-selector spec.type=LoadBalancer  # delete each NLB Service listed
kubectl delete pvc --all -A                           # Storage lesson: EBS volumes
kubectl delete nodepools --all                        # only if you installed Karpenter; wait for its nodes to go
helm uninstall my-redis -n cache                      # Deploy lesson
helm uninstall aws-load-balancer-controller -n kube-system   # Networking lesson
# -- now run: eksctl delete cluster -f cluster.yaml --wait --
aws iam detach-role-policy --role-name EfsCsiRole --policy-arn arn:aws:iam::aws:policy/service-role/AmazonEFSCSIDriverPolicy
aws iam delete-role --role-name EfsCsiRole                 # Add-ons lesson (role you made by hand)
aws logs delete-log-group --log-group-name /aws/eks/demo-std/cluster   # only if you turned on logging

Also delete any EFS file system you created (EFS console), then run the leftover check.

Built it with Terraform or CDK instead? Run terraform destroy or cdk destroy. Always tear down with the same tool you built with.

Key takeaways

  • eksctl create cluster --enable-auto-mode is the fastest start.
  • aws eks update-kubeconfig connects kubectl.
  • describe and logs are your best friends.
Level 2 ยท First Cluster

AWS Console Tour: Every Setting Explained

You will learn: each screen and setting when you create a cluster, add a node group, or add a Fargate profile in the EKS console โ€” and what to pick.

In the console, go to Amazon EKS โ†’ Clusters โ†’ Create cluster. You will see two choices:

โšก Quick configuration (with EKS Auto Mode)

Only a few fields: name, version, cluster IAM role, node IAM role, VPC, subnets. AWS picks good defaults for the rest. Can create the IAM roles for you.

๐Ÿ”ง Custom configuration

Every setting is shown. You can turn Auto Mode on or off. The steps below follow this path.

๐Ÿ–ฑ๏ธ Interactive mock: hover over a field

This is a simplified copy of the console. Click a step on the left, then hover over (or tap) a field to see what it means.

aws   Amazon EKS โ€บ Clusters โ€บ Create cluster
Hover over a field to see an explanation.

Full reference: create cluster (Custom configuration)

Step 1 โ€” Configure cluster
Use EKS Auto Mode
Turns on AWS-managed nodes, storage, load balancing, and core add-ons. If on, you also pick a node IAM role and which built-in node pools to enable (general-purpose and system).Recommended for new clusters unless you need custom AMIs or SSH into nodes.
Name
Cluster name. Unique per Region in your account. Cannot be changed later.
Kubernetes version
Pick the newest version unless your tools need an older one.Newest = longest support window.
Cluster IAM role
The role EKS uses to manage AWS resources for you. Standard clusters need AmazonEKSClusterPolicy. Auto Mode clusters also need AmazonEKSComputePolicy, AmazonEKSBlockStoragePolicyV2, AmazonEKSLoadBalancingPolicy, and AmazonEKSNetworkingPolicy. Cannot be changed after creation.
Upgrade policy (Support type)
Extended (default): when standard support ends, the cluster stays on its version and pays extended-support pricing. Standard: AWS auto-upgrades the control plane when standard support ends; no extra cost.Pick Standard if you upgrade on time and want to avoid surprise costs.
Cluster access โ†’ Bootstrap cluster administrator access
If allowed, the IAM identity creating the cluster gets full admin. If you turn it off, make sure you add another admin access entry or you can lock yourself out.
Cluster authentication mode
EKS API (access entries only), EKS API and ConfigMap, or ConfigMap (old aws-auth method). You can move toward EKS API later, but not back.Use EKS API for new clusters.
Secrets encryption
Adds an extra layer of encryption to Kubernetes Secrets with your own AWS KMS key (envelope encryption). EKS already encrypts storage at rest by default.
ARC zonal shift
Lets Amazon Application Recovery Controller move traffic away from a broken Availability Zone. Turn on for production.
Control plane scaling tier
Optional Provisioned Control Plane tiers for very large or busy clusters. Leave as Standard unless you have a huge cluster; higher tiers cost more.
Deletion protection
When on, the cluster cannot be deleted until you turn it off. Good for production.
Tags
Labels like env=prod, owner=team-a. Used for cost reports and access rules.
Step 2 โ€” Specify networking
VPC
The network for your cluster. Must have DNS hostnames and DNS resolution turned on. Create a dedicated one (eksctl or the AWS EKS CloudFormation VPC template can make it).
Subnets
Pick at least two in different AZs. Use private subnets for nodes and public subnets for internet-facing load balancers. Pods take VPC IP addresses, so make subnets big (e.g., /19).Tag public subnets kubernetes.io/role/elb=1 and private subnets kubernetes.io/role/internal-elb=1 so load balancers land in the right place.
Additional security groups
Extra firewalls attached to the control plane network cards. EKS always creates a cluster security group automatically.
Choose cluster IP address family
IPv4 (default) or IPv6 (solves running out of IPs; cannot change later).
Configure Kubernetes service IP address block
The internal range used for Service IPs (default 10.100.0.0/16 or 172.20.0.0/16). Must not overlap your VPC or connected networks.
Cluster endpoint access
Public: API reachable from the internet (still needs IAM auth). Public and private: nodes use the private path, people can use public (you can limit to certain IP ranges). Private: only from inside the VPC / VPN.Production: Private, or Public+Private with allowed CIDR blocks.
Configure remote networks (Hybrid nodes)
Only if you will join servers from your own data center (EKS Hybrid Nodes). Enter your on-prem node and pod IP ranges.
Step 3 โ€” Configure observability
Prometheus metrics
Send metrics to Amazon Managed Service for Prometheus with an agentless scraper.
Control plane logging
Send control plane logs to CloudWatch Logs. Types: API server, Audit (who did what), Authenticator (sign-in attempts), Controller manager, Scheduler.Turn on at least Audit and Authenticator in production. Logs cost money โ€” set a retention period.
CloudWatch Observability / Container Insights
Can be added here or as the amazon-cloudwatch-observability add-on for node, pod, and app metrics and logs.
Step 4 โ€” Select add-ons

Pick the EKS add-ons to install now (more on the Add-ons tab). On standard clusters the defaults are Amazon VPC CNI, CoreDNS, kube-proxy, and usually EKS Pod Identity Agent. With Auto Mode, these core pieces are built in. You can also pick Amazon EBS CSI driver, EFS CSI driver, Mountpoint for S3, CloudWatch Observability, Metrics Server, Node monitoring agent, GuardDuty agent, and community or AWS Marketplace add-ons.

Step 5 โ€” Configure selected add-ons settings
Version
The add-on version. Default is the one AWS recommends for your Kubernetes version.
Add-on access (IAM role)
For add-ons that call AWS APIs (EBS CSI, VPC CNI, etc.), pick an IAM role via EKS Pod Identity (recommended) or IRSA. The console can create the role for you.
Optional configuration settings
JSON/YAML settings, such as CoreDNS replica count or VPC CNI options.
Conflict resolution method
Override = EKS settings win over manual changes. Preserve = keep your changes (updates only). None = fail if there is a conflict.
Step 6 โ€” Review and create

Check everything. Creation takes ~10โ€“15 minutes. Status goes Creating โ†’ Active.

Cluster page tabs (after creation)

Click a cluster's name in Amazon EKS โ†’ Clusters and you land on its detail page, which has a row of tabs. Pick a tab below to see each item on it, what it is, and what you use it for. (AWS adjusts the console often, so exact labels may differ slightly.)

Add managed node group (Compute โ†’ Add node group)

Configure node group
Name
e.g., ng-general. Cannot change later.
Node IAM role
The role every node uses. Needs AmazonEKSWorkerNodePolicy, AmazonEC2ContainerRegistryReadOnly (or the newer AmazonEC2ContainerRegistryPullOnly) and, if VPC CNI uses the node role, AmazonEKS_CNI_Policy.
Launch template
Optional EC2 template for custom user data, extra security groups, custom AMIs, metadata (IMDS) settings, or disk encryption.
Kubernetes labels
Key=value tags on the nodes so you can target them (e.g., workload=gpu).
Kubernetes taints
"Keep out" signs. Only pods with a matching toleration may run there. Effects: NoSchedule, PreferNoSchedule, NoExecute.
Node auto repair
When on, EKS replaces nodes that report unhealthy (works with the node monitoring agent).Turn on.
Tags
AWS tags on the node group (and optionally the instances).
Set compute and scaling configuration
AMI type
The operating system image: Amazon Linux 2023 (x86 or ARM/Graviton), AL2023 NVIDIA / Neuron for GPUs and AWS ML chips, Bottlerocket, or Windows Server. AL2 AMIs are no longer published.
Capacity type
On-Demand (steady, normal price) or Spot (up to 90% cheaper but can be taken back with 2 minutes' warning). Spot is great for stateless or batch work.
Instance types
Server sizes. For Spot, list several similar types to improve availability.
Disk size
Root disk in GiB (default 20). Images and logs live here; 50+ is common.
Node group scaling: Desired / Minimum / Maximum
How many nodes now, at least, and at most. A node autoscaler (Cluster Autoscaler) moves "desired" between min and max.
Node group update configuration
Maximum unavailable as a number or percentage โ€” how many nodes are replaced at once during an update. Also an update strategy: Default (launch new nodes before removing old) or Minimal (remove old first โ€” useful for scarce or costly GPUs).
Specify networking
Subnets
Where nodes launch. Use private subnets across 2โ€“3 AZs.
Configure remote access to nodes
SSH key and allowed sources. Better: leave off and use AWS Systems Manager Session Manager.

Add Fargate profile (Compute โ†’ Add Fargate profile)

Name / Pod execution role
The role Fargate uses to pull images and write logs.
Subnets
Private subnets only.
Pod selectors
Namespace (required) and optional labels. Matching pods run on Fargate โ€” each pod gets its own small, isolated VM.

๐Ÿงน Teardown C: Cluster built in the AWS Console

The console doesn't record what it built as one group you can delete in one go, so you remove the pieces it made, in order. These are the steps for a cluster created exactly as in this tour:

  1. Compute tab โ†’ Node groups (standard clusters only): select each node group โ†’ Delete โ†’ type its name โ†’ Delete. Wait until the list is empty. Auto Mode clusters have no node groups; skip this step.
  2. Overview tab: if you turned on Deletion protection, choose Manage and turn it off.
  3. Delete the cluster: Clusters list โ†’ select the cluster โ†’ Delete โ†’ type the name โ†’ Delete. It shows Deleting and then disappears (10โ€“15 min). Auto Mode nodes are deleted with it.
  4. CloudFormation console: if you created the VPC from the AWS EKS VPC template, delete that stack. This removes the VPC, subnets and NAT gateway.

Only if you chose these options while creating the cluster:

  • Control plane logging (Step 3): delete the /aws/eks/CLUSTER-NAME/cluster log group in CloudWatch. It isn't deleted with the cluster.
  • Prometheus scraper (Step 3): delete the scraper (and the workspace) in Amazon Managed Service for Prometheus. They are billed separately.
  • Roles the console created for you: delete them in IAM (for example AmazonEKSAutoClusterRole and AmazonEKSAutoNodeRole). Optional, because roles are free.
Same thing with the AWS CLI
Terminal
aws eks list-nodegroups --cluster-name demo-console
aws eks delete-nodegroup --cluster-name demo-console --nodegroup-name ng-general
aws eks wait nodegroup-deleted --cluster-name demo-console --nodegroup-name ng-general
aws eks update-cluster-config --name demo-console --no-deletion-protection
aws eks delete-cluster --name demo-console
aws eks wait cluster-deleted --name demo-console
aws cloudformation delete-stack --stack-name my-eks-vpc
aws eks wait ... pauses until the item is really gone, so each step finishes before the next one starts.
Did you add things later (Fargate profiles, capabilities, apps with load balancers or disks)? Expand.
  • Before deleting the cluster, run kubectl delete ingress --all -A, delete each LoadBalancer Service, and run kubectl delete pvc --all -A.
  • Delete any Fargate profiles (Compute tab) and Capabilities such as Argo CD, ACK or kro (Capabilities tab). The cluster can't be deleted while they exist.
  • Then follow the steps above and finish with the leftover check.

Key takeaways

  • Some settings are permanent: name, cluster IAM role, IP family, service IP range, VPC.
  • Use private subnets, EKS API auth mode, and turn on audit logs.
  • Node group "update configuration" controls how patching rolls out.
Level 3 ยท Run Apps

Compute: Where Your Pods Run

You will learn: the five ways to provide nodes, when to use each, and how Karpenter and Auto Mode node pools work.
OptionWho manages serversGood forWatch out
EKS Auto ModeAWS (fully)Most new clusters; small teamsNo SSH/custom AMI; extra fee; nodes replaced at least every 21 days
Managed node groupsAWS launches & updates; you choose and triggerClassic, predictable setupsYou must patch (click "Update") and scale
Karpenter (self-installed)You install Karpenter; it picks instancesFast, cost-smart scaling with lots of controlYou upgrade Karpenter itself
Self-managed nodesYou (Auto Scaling groups)Special OS needsMost work; you handle everything
AWS FargateAWS (serverless pods)Small, spiky, isolated jobsNo DaemonSets, no EBS volumes, no GPUs, slower start
EKS Hybrid NodesYou (your own servers)Using on-premises hardwareNeeds a network link to AWS

How Karpenter / Auto Mode chooses servers

Pod is Pending
โ†’
Read its CPU/memory requests, labels, zones
โ†’
Check NodePool rules
โ†’
Pick cheapest fitting EC2 type
โ†’
Launch node (~1 min)
โ†’
Later: consolidate & remove empty nodes

NodePool example (Auto Mode)

Auto Mode comes with two built-in pools: general-purpose (On-Demand C/M/R types, x86) and system (for add-ons, tainted CriticalAddonsOnly). You cannot edit them, but you can add your own:

spot-pool.yaml
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
  name: spot-graviton
spec:
  template:
    spec:
      nodeClassRef:                     # Auto Mode's NodeClass (network, disk, role settings)
        group: eks.amazonaws.com
        kind: NodeClass
        name: default
      requirements:
        - key: karpenter.sh/capacity-type
          operator: In
          values: ["spot", "on-demand"] # prefer Spot, fall back to On-Demand
        - key: kubernetes.io/arch
          operator: In
          values: ["arm64"]             # Graviton = cheaper per CPU
        - key: eks.amazonaws.com/instance-category
          operator: In
          values: ["c", "m"]
  limits:
    cpu: "200"                          # never more than 200 vCPU total
  disruption:
    consolidationPolicy: WhenEmptyOrUnderutilized
    consolidateAfter: 1m
On self-installed Karpenter the idea is the same, but nodeClassRef points to an EC2NodeClass (group karpenter.k8s.aws) and labels use karpenter.k8s.aws/....

Requests and limits (tell the scheduler what you need)

snippet
resources:
  requests: { cpu: "250m", memory: "256Mi" }  # reserved for you; used for placement
  limits:   { memory: "512Mi" }               # hard cap; going over memory = pod is killed (OOMKilled)
250m = 250 millicores = ยผ of a CPU. Always set requests โ€” autoscalers and the scheduler rely on them.

Steering pods to nodes

nodeSelector

"Only run on nodes with this label." Simple and strict.

Affinity / anti-affinity

"Prefer" or "require" rules โ€” e.g., spread copies across AZs.

Taints & tolerations

Nodes repel pods unless the pod tolerates the taint (e.g., GPU nodes).

Topology spread constraints

Evenly spread pods across zones/nodes for high availability.

Key takeaways

  • New clusters: start with Auto Mode. Existing clusters: managed node groups or Karpenter.
  • Always set CPU/memory requests.
  • Spot + Graviton saves a lot for workloads that can handle restarts.
Level 3 ยท Run Apps

Amazon ECR: Storing Your Images

You will learn: how to create a private registry repository, push an image, scan it for security problems, clean up old images, and let EKS pull it.
ECR is a private warehouse for your sealed lunchboxes (images). Your EKS nodes go to the warehouse and pick up the boxes they need.

Image address format

111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.0

= account ID . registry in Region / repository name : tag

โ–ถ๏ธ Walkthrough: build, push, and scan

Terminal
aws ecr create-repository --repository-name hello-app \
    --image-scanning-configuration scanOnPush=true \
    --image-tag-mutability IMMUTABLE \
    --encryption-configuration encryptionType=AES256 \
    --region us-west-2
{
    "repository": {
        "repositoryArn": "arn:aws:ecr:us-west-2:111122223333:repository/hello-app",
        "repositoryName": "hello-app",
        "repositoryUri": "111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app",
        "imageTagMutability": "IMMUTABLE",
        "imageScanningConfiguration": { "scanOnPush": true },
        ...
    }
}
Why each flag: scanOnPush checks every new image for known security holes. IMMUTABLE means a tag like 1.0 can never be overwritten โ€” so "1.0" always means the same thing. Save the repositoryUri.
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 111122223333.dkr.ecr.us-west-2.amazonaws.com
Login Succeeded
Why: Docker needs a password for ECR. The AWS CLI makes a temporary one (good for 12 hours) and pipes it into docker login.
docker build --platform linux/amd64 -t hello-app:1.0 .
docker tag hello-app:1.0 111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.0
docker push 111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.0
The push refers to repository [111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app]
5f70bf18a086: Pushed
a3c1d0b2e7f1: Pushed
1.0: digest: sha256:9b7c...e21f size: 1365
Why: --platform linux/amd64 builds for x86 nodes (important if you use an Apple Silicon Mac; use linux/arm64 for Graviton, or docker buildx for both). tag gives the image its full ECR address. push uploads it. The digest is a unique fingerprint.
aws ecr describe-image-scan-findings --repository-name hello-app --image-id imageTag=1.0 \
    --query "imageScanFindings.findingSeverityCounts"
{
    "HIGH": 1,
    "MEDIUM": 4,
    "LOW": 7
}
Why: Shows how many known vulnerabilities were found by severity. Fix HIGH and CRITICAL ones by updating your base image and rebuilding. For deeper, continuous scanning, turn on Enhanced scanning (uses Amazon Inspector).
aws ecr list-images --repository-name hello-app
{
    "imageIds": [
        { "imageDigest": "sha256:9b7c...e21f", "imageTag": "1.0" }
    ]
}
Done! The image is in ECR. Use the full URI in your Kubernetes YAML.

How does EKS get permission to pull?

  • Same account: the node IAM role needs AmazonEC2ContainerRegistryReadOnly or AmazonEC2ContainerRegistryPullOnly. eksctl and Auto Mode set this up. No imagePullSecrets are needed.
  • Fargate: the pod execution role needs the same pull permission.
  • Other account: add a repository policy in the ECR account that allows the node role (or the whole account) to pull.
cross-account-pull.json (repository policy)
{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "AllowPullFromProdAccount",
    "Effect": "Allow",
    "Principal": { "AWS": "arn:aws:iam::444455556666:root" },
    "Action": ["ecr:BatchGetImage", "ecr:GetDownloadUrlForLayer", "ecr:BatchCheckLayerAvailability"]
  }]
}
Apply with aws ecr set-repository-policy --repository-name hello-app --policy-text file://cross-account-pull.json. The other account's node role also needs ECR pull permission in its own IAM policy.

Keep ECR tidy: lifecycle policies

lifecycle.json
{
  "rules": [
    { "rulePriority": 1, "description": "Delete untagged images after 7 days",
      "selection": { "tagStatus": "untagged", "countType": "sinceImagePushed", "countUnit": "days", "countNumber": 7 },
      "action": { "type": "expire" } },
    { "rulePriority": 2, "description": "Keep only the newest 30 images",
      "selection": { "tagStatus": "any", "countType": "imageCountMoreThan", "countNumber": 30 },
      "action": { "type": "expire" } }
  ]
}
aws ecr put-lifecycle-policy --repository-name hello-app --lifecycle-policy-text file://lifecycle.json โ€” old images are deleted automatically, saving storage cost. Test it first with the console's "lifecycle policy preview."

More ECR features you will use

FeatureWhat it does
Pull through cacheCopies images from public registries (Docker Hub, Quay, GitHub, ECR Public, Kubernetes registry) into your ECR the first time they are pulled. Faster, avoids Docker Hub rate limits, and gives you scanning.
ReplicationAutomatically copies images to other Regions or accounts (for disaster recovery or multi-Region apps).
Enhanced scanningAmazon Inspector scans OS and language packages continuously, not just on push.
KMS encryptionEncrypt images with your own KMS key instead of the default AES-256.
Image signingSign images (AWS Signer + Notation) and only allow signed images into the cluster with a policy tool such as Kyverno.
Repository creation templatesDefault settings for repos created automatically (by pull-through cache or replication).
In production, refer to images by digest (hello-app@sha256:...) or immutable tags. Never use :latest โ€” you cannot tell which version is running.

Key takeaways

  • Create repo โ†’ log in โ†’ build โ†’ tag โ†’ push.
  • Turn on scan-on-push and immutable tags.
  • Nodes pull with the node IAM role; cross-account needs a repository policy.
Level 3 ยท Run Apps

Deploy Applications

You will learn: a complete production-style app manifest, rolling updates, rollbacks, health checks, autoscaling, and Helm.

A complete app (Deployment + Service + HPA)

app.yaml
apiVersion: v1
kind: Namespace
metadata: { name: shop }
---
apiVersion: apps/v1
kind: Deployment
metadata: { name: hello, namespace: shop }
spec:
  replicas: 3
  revisionHistoryLimit: 5                      # keep 5 old versions for rollback
  strategy:
    type: RollingUpdate
    rollingUpdate: { maxSurge: 1, maxUnavailable: 0 }  # add 1 new before removing 1 old
  selector: { matchLabels: { app: hello } }
  template:
    metadata: { labels: { app: hello } }
    spec:
      topologySpreadConstraints:               # spread across AZs
      - maxSkew: 1
        topologyKey: topology.kubernetes.io/zone
        whenUnsatisfiable: ScheduleAnyway
        labelSelector: { matchLabels: { app: hello } }
      containers:
      - name: web
        image: 111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.0
        ports: [{ containerPort: 80 }]
        resources:
          requests: { cpu: 100m, memory: 128Mi }
          limits:   { memory: 256Mi }
        readinessProbe:                        # "ready for traffic?"
          httpGet: { path: /, port: 80 }
          periodSeconds: 5
        livenessProbe:                         # "still alive? if not, restart me"
          httpGet: { path: /, port: 80 }
          initialDelaySeconds: 10
        securityContext:
          allowPrivilegeEscalation: false
---
apiVersion: v1
kind: Service
metadata: { name: hello, namespace: shop }
spec:
  type: ClusterIP                              # inside-cluster address only
  selector: { app: hello }
  ports: [{ port: 80, targetPort: 80 }]
---
apiVersion: policy/v1
kind: PodDisruptionBudget                      # protects you during node patching
metadata: { name: hello, namespace: shop }
spec:
  minAvailable: 2
  selector: { matchLabels: { app: hello } }
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata: { name: hello, namespace: shop }
spec:
  scaleTargetRef: { apiVersion: apps/v1, kind: Deployment, name: hello }
  minReplicas: 3
  maxReplicas: 20
  metrics:
  - type: Resource
    resource: { name: cpu, target: { type: Utilization, averageUtilization: 70 } }

โ–ถ๏ธ Walkthrough: deploy, update, roll back

Terminal
kubectl apply -f app.yaml
namespace/shop created
deployment.apps/hello created
service/hello created
poddisruptionbudget.policy/hello created
horizontalpodautoscaler.autoscaling/hello created
What happened: apply sent the whole file. Each object reports "created". Run it again later and it says "unchanged" or "configured" โ€” apply is safe to repeat.
kubectl -n shop get deploy,pods,svc,hpa
NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/hello   3/3     3            3           40s

NAME                         READY   STATUS    RESTARTS   AGE
pod/hello-7c9d8f6b5-2xk8p    1/1     Running   0          40s
pod/hello-7c9d8f6b5-9qwr4    1/1     Running   0          40s
pod/hello-7c9d8f6b5-tz6lm    1/1     Running   0          40s

NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/hello   ClusterIP   10.100.142.17   <none>        80/TCP    40s

NAME                                        REFERENCE          TARGETS       MINPODS   MAXPODS   REPLICAS
horizontalpodautoscaler.autoscaling/hello   Deployment/hello   cpu: 2%/70%   3         20        3
Reading it: READY 3/3 = all copies are healthy. The HPA shows current CPU (2%) vs target (70%). If HPA shows <unknown>, Metrics Server is missing.
kubectl -n shop port-forward svc/hello 8080:80
Forwarding from 127.0.0.1:8080 -> 80
Why: A quick private test tunnel from your laptop to the Service. Open http://localhost:8080. Ctrl+C to stop. (The Networking tab shows how to expose it to the internet.)
kubectl -n shop set image deployment/hello web=111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.1
deployment.apps/hello image updated
kubectl -n shop rollout status deployment/hello
Waiting for deployment "hello" rollout to finish: 1 out of 3 new replicas have been updated...
Waiting for deployment "hello" rollout to finish: 2 out of 3 new replicas have been updated...
deployment "hello" successfully rolled out
Rolling update: Kubernetes starts one new pod, waits for its readiness probe, then removes an old one, and repeats. No downtime. (In real life, change the image in your YAML/Git and re-apply instead of set image.)
kubectl -n shop rollout history deployment/hello
REVISION  CHANGE-CAUSE
1         <none>
2         <none>
kubectl -n shop rollout undo deployment/hello
deployment.apps/hello rolled back
Oops, 1.1 is broken? rollout undo goes back to the previous revision in seconds. Add --to-revision=N to pick one.
kubectl -n shop describe pod hello-7c9d8f6b5-2xk8p | tail -8
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  3m    default-scheduler  Successfully assigned shop/hello-... to i-0a1b2c3d4e5f67890
  Normal  Pulling    3m    kubelet            Pulling image "111122223333.dkr.ecr...hello-app:1.0"
  Normal  Pulled     3m    kubelet            Successfully pulled image in 2.1s
  Normal  Created    3m    kubelet            Created container: web
  Normal  Started    3m    kubelet            Started container web
The Events section is the story of the pod's life. When something fails, the reason is almost always here.

Configuration and secrets

Terminal
kubectl -n shop create configmap hello-config --from-literal=COLOR=blue
kubectl -n shop create secret generic db-pass --from-literal=PASSWORD='s3cr3t'
# then in the container spec:  envFrom: [{configMapRef: {name: hello-config}}, {secretRef: {name: db-pass}}]
Kubernetes Secrets are only base64-encoded, not strongly protected by themselves. For real secrets, store them in AWS Secrets Manager and load them with the Secrets Store CSI Driver + AWS provider (or External Secrets Operator), and turn on KMS secrets encryption.

Helm: install packaged apps

Terminal
helm repo add bitnami https://charts.bitnami.com/bitnami && helm repo update
helm install my-redis bitnami/redis -n cache --create-namespace --set architecture=standalone
NAME: my-redis
NAMESPACE: cache
STATUS: deployed
REVISION: 1
helm list -A
helm upgrade my-redis bitnami/redis -n cache -f values.yaml
helm rollback my-redis 1 -n cache
A chart is a bundle of templated YAML. Values fill in the blanks. Helm tracks revisions, so you can roll back. Helm 3 can also install charts stored in ECR (OCI format).

GitOps (how pros deploy)

Instead of running kubectl apply by hand, teams keep YAML in Git and let a tool like Argo CD or Flux sync the cluster to match Git. Every change is reviewed in a pull request and easy to undo. EKS offers a fully managed Argo CD capability so you do not have to run Argo CD yourself.

Key takeaways

  • Use probes, requests, PDBs, and topology spread for reliable apps.
  • rollout status / rollout undo make updates safe.
  • Helm packages apps; GitOps automates deploys.
Level 3 ยท Run Apps

Networking & Load Balancing

You will learn: how pods get IP addresses, the Service types, how to expose apps with ALB and NLB, DNS, and network policies.

How pods get addresses: the Amazon VPC CNI

On EKS, each pod gets a real IP address from your VPC subnet. This makes pods first-class network citizens (security groups and VPC tools work), but it uses lots of IPs. Each EC2 type has a limit on network cards and IPs, which limits pods per node.

Running out of IPs? Turn on prefix delegation (ENABLE_PREFIX_DELEGATION=true on the VPC CNI) to give each node blocks of 16 IPs, use larger subnets, add a secondary CIDR (custom networking), or use IPv6.

Service types

TypeReachable fromUse it for
ClusterIP (default)Only inside the clusterBackend services, databases
NodePortA port on every nodeRarely used directly
LoadBalancerInternet or VPC via an AWS NLBTCP/UDP apps, gRPC, non-HTTP
Ingress (not a Service type, an object)Internet via an AWS ALBWebsites and HTTP APIs; path/host routing; HTTPS
Who builds the AWS load balancer? On Auto Mode, AWS does (built in). On standard clusters, install the AWS Load Balancer Controller with Helm. Gateway API is also supported by the controller for newer routing setups.

Expose the app with an ALB (Ingress)

Auto Mode: ingressclass.yaml
apiVersion: eks.amazonaws.com/v1
kind: IngressClassParams
metadata: { name: alb }
spec:
  scheme: internet-facing
---
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata: { name: alb }
spec:
  controller: eks.amazonaws.com/alb
  parameters:
    apiGroup: eks.amazonaws.com
    kind: IngressClassParams
    name: alb
Standard: install AWS LB Controller
# 1. IAM role for the controller (Pod Identity)
#    using AWS's published IAM policy JSON
helm repo add eks https://aws.github.io/eks-charts
helm install aws-load-balancer-controller \
  eks/aws-load-balancer-controller \
  -n kube-system \
  --set clusterName=demo-std \
  --set serviceAccount.name=aws-load-balancer-controller \
  --set vpcId=vpc-0abc123
kubectl -n kube-system get deploy aws-load-balancer-controller
NAME                           READY   UP-TO-DATE
aws-load-balancer-controller   2/2     2
# IngressClass "alb" (controller ingress.k8s.aws/alb)
# is created by the chart.
ingress.yaml (works with both)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hello
  namespace: shop
  annotations:
    alb.ingress.kubernetes.io/scheme: internet-facing   # public (use "internal" for private)
    alb.ingress.kubernetes.io/target-type: ip           # send traffic straight to pod IPs
    # alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:...  (HTTPS with ACM)
spec:
  ingressClassName: alb
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend: { service: { name: hello, port: { number: 80 } } }
Terminal
kubectl apply -f ingress.yaml
kubectl -n shop get ingress hello
NAME    CLASS   HOSTS   ADDRESS                                                  PORTS   AGE
hello   alb     *       k8s-shop-hello-1a2b3c4d5e-123456789.us-west-2.elb.amazonaws.com   80      2m
After 2โ€“3 minutes the ALB is ready. Open the ADDRESS in a browser. If ADDRESS stays empty, run kubectl describe ingress hello -n shop and look at Events โ€” usually missing subnet tags or IAM permissions.

Expose with an NLB (Service type LoadBalancer)

nlb-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: hello-nlb
  namespace: shop
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
    # Standard clusters with the LB Controller also add:
    # service.beta.kubernetes.io/aws-load-balancer-type: external
spec:
  type: LoadBalancer
  loadBalancerClass: eks.amazonaws.com/nlb   # Auto Mode. (LB Controller: service.k8s.aws/nlb)
  selector: { app: hello }
  ports: [{ port: 80, targetPort: 80 }]

DNS inside the cluster (CoreDNS)

Every Service gets a name: hello.shop.svc.cluster.local (or just hello from the same namespace). CoreDNS answers these lookups. Add ExternalDNS to create Route 53 records for your Ingresses automatically.

Network policies (pod firewalls)

By default, any pod can talk to any pod. A NetworkPolicy limits that. The VPC CNI can enforce them (turn on enableNetworkPolicy in the add-on settings; built in on Auto Mode).

only-frontend.yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: api-allow-frontend, namespace: shop }
spec:
  podSelector: { matchLabels: { app: api } }       # protect pods labeled app=api
  policyTypes: ["Ingress"]
  ingress:
  - from: [{ podSelector: { matchLabels: { app: frontend } } }]   # only frontend may connect
    ports: [{ port: 8080 }]
Need AWS security groups on individual pods (e.g., to reach an RDS database)? Use Security Groups for Pods.

Key takeaways

  • Pods get real VPC IPs โ€” plan big subnets.
  • Ingress โ†’ ALB (HTTP). Service LoadBalancer โ†’ NLB (TCP/UDP).
  • Auto Mode builds load balancers itself; standard clusters need the AWS Load Balancer Controller.
Level 3 ยท Run Apps

Storage: Keeping Data

You will learn: why pods lose data, StorageClass/PVC/PV, and when to use EBS, EFS, S3, or FSx.

A container's files disappear when it restarts. To keep data, attach a volume.

๐Ÿ“ StorageClass
"type of disk"
โ†’
๐Ÿ™‹ PVC
"I want 10 GiB"
โ†’
๐Ÿ’พ PV
real EBS volume created
โ†’
๐Ÿ“ฆ Pod mounts it
The StorageClass is the menu. The PVC is your order ("one 10 GiB fast disk"). The PV is the actual dish delivered. The CSI driver is the kitchen that cooks it.

Choose the right storage

StorageDriverShared by many pods?Best for
Amazon EBSEBS CSI driver (built into Auto Mode)No (one node, one AZ)Databases, single-writer apps
Amazon EFSEFS CSI driverYes, across AZsShared files, CMS uploads
Amazon S3Mountpoint for S3 CSI driverYes (read-heavy)ML datasets, big read-mostly files
FSx (Lustre, NetApp ONTAP, OpenZFS)FSx CSI driversYesHigh-performance computing, enterprise NAS
Instance store / emptyDirBuilt inNo; lost when pod/node goesScratch and cache

EBS example

storage.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp3
  annotations: { storageclass.kubernetes.io/is-default-class: "true" }
provisioner: ebs.csi.eks.amazonaws.com   # Auto Mode. Standard EBS CSI add-on: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer  # create the disk in the same AZ as the pod
reclaimPolicy: Delete                    # "Retain" keeps the disk after the PVC is deleted
allowVolumeExpansion: true
parameters:
  type: gp3
  encrypted: "true"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata: { name: data, namespace: shop }
spec:
  accessModes: ["ReadWriteOnce"]         # one node at a time
  storageClassName: gp3
  resources: { requests: { storage: 10Gi } }
Terminal
kubectl -n shop get pvc
NAME   STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
data   Pending                                      gp3            5s
# ...after a pod that uses it is scheduled...
data   Bound     pvc-6f1e...   10Gi   RWO   gp3   40s
Pending is normal with WaitForFirstConsumer โ€” the disk is created only when a pod needs it, so it lands in that pod's AZ. For databases, use a StatefulSet, which gives each replica its own PVC.
EBS volumes live in one Availability Zone. A pod using one can only run in that AZ. Spread replicas across AZs at the app level (each with its own volume), or use EFS for shared data.

Backups and snapshots

Install the CSI snapshot controller add-on to take VolumeSnapshots of EBS volumes. For whole-cluster backup (YAML + volumes), use AWS Backup for EKS or Velero.

Key takeaways

  • StorageClass โ†’ PVC โ†’ PV.
  • EBS = one pod/AZ; EFS = shared; S3 = big read-mostly data.
  • Use WaitForFirstConsumer and encryption.
Level 4 ยท Operate

Security & Access

You will learn: the three identity questions in EKS โ€” who can use the cluster, what pods can do in AWS, and what users can do inside Kubernetes.

1. People โ†’ cluster

Access entries map an IAM user/role to cluster permissions.

2. Pods โ†’ AWS

EKS Pod Identity (or IRSA) gives a pod an IAM role, e.g., to read S3.

3. Inside Kubernetes

RBAC roles say who can do what to which objects.

1. Access entries (give a team access)

Walkthrough: read-only access for developers in one namespace
aws eks create-access-entry --cluster-name demo \
    --principal-arn arn:aws:iam::111122223333:role/DevTeam
{
    "accessEntry": {
        "clusterName": "demo",
        "principalArn": "arn:aws:iam::111122223333:role/DevTeam",
        "kubernetesGroups": [],
        "username": "arn:aws:sts::111122223333:assumed-role/DevTeam/{{SessionName}}",
        "type": "STANDARD"
    }
}
Step 1: Let the DevTeam IAM role sign in to the cluster. By itself, this gives no permissions yet.
aws eks associate-access-policy --cluster-name demo \
    --principal-arn arn:aws:iam::111122223333:role/DevTeam \
    --policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy \
    --access-scope type=namespace,namespaces=shop
{
    "clusterName": "demo",
    "principalArn": "arn:aws:iam::111122223333:role/DevTeam",
    "associatedAccessPolicy": {
        "policyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy",
        "accessScope": { "type": "namespace", "namespaces": ["shop"] }
    }
}
Step 2: Attach an AWS-managed access policy, limited to the shop namespace. Policies: AmazonEKSClusterAdminPolicy (everything), AmazonEKSAdminPolicy, AmazonEKSEditPolicy, AmazonEKSViewPolicy.
aws eks list-access-entries --cluster-name demo
{
    "accessEntries": [
        "arn:aws:iam::111122223333:role/AWSReservedSSO_AdministratorAccess_abc123",
        "arn:aws:iam::111122223333:role/DevTeam",
        "arn:aws:iam::111122223333:role/eksctl-demo-...-NodeRole"
    ]
}
Check: You see the creator (admin), the new DevTeam role, and the node role (nodes also need an entry to join).
Old clusters used the aws-auth ConfigMap in kube-system. It is easy to break and lock everyone out. Move to access entries: set authentication mode to EKS API and ConfigMap, recreate the mappings as access entries, then switch to EKS API.

2. Pods calling AWS: Pod Identity vs IRSA

EKS Pod Identity (recommended)IRSA (older)
SetupInstall Pod Identity Agent add-on (built into Auto Mode); create an associationCreate an OIDC provider per cluster; edit the role trust policy
Role trust policyTrusts pods.eks.amazonaws.com once โ€” reuse in any clusterMust list each cluster's OIDC URL
LimitsNo OIDC provider limit100 OIDC providers per account by default
Session tags (ABAC)YesNo
Works on Fargate / outside EKSNot on FargateYes (Fargate, self-managed K8s)
Pod Identity: let pods in "shop" read an S3 bucket
# trust-policy.json lets EKS Pod Identity use the role
cat > trust-policy.json <<'EOF'
{ "Version": "2012-10-17",
  "Statement": [{ "Effect": "Allow",
    "Principal": { "Service": "pods.eks.amazonaws.com" },
    "Action": ["sts:AssumeRole", "sts:TagSession"] }] }
EOF
aws iam create-role --role-name ShopS3Read --assume-role-policy-document file://trust-policy.json
aws iam attach-role-policy --role-name ShopS3Read --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
kubectl -n shop create serviceaccount s3-reader
aws eks create-pod-identity-association --cluster-name demo --namespace shop \
    --service-account s3-reader --role-arn arn:aws:iam::111122223333:role/ShopS3Read
# In the Deployment pod spec:  serviceAccountName: s3-reader
The AWS SDK in your app finds the credentials automatically. Never put access keys in images or ConfigMaps. In production, use a tighter policy than full S3 read-only.

3. Kubernetes RBAC

rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role                                   # permissions inside one namespace
metadata: { name: pod-restarter, namespace: shop }
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "list", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding                            # who gets the Role
metadata: { name: oncall-restarters, namespace: shop }
subjects:
- kind: Group
  name: oncall                               # set via access entry "kubernetesGroups"
  apiGroup: rbac.authorization.k8s.io
roleRef: { kind: Role, name: pod-restarter, apiGroup: rbac.authorization.k8s.io }
Check permissions with kubectl auth can-i delete pods -n shop --as-group=oncall --as=test.

Security checklist

  • Private API endpoint (or limited CIDRs); nodes in private subnets.
  • Access entries with least privilege; no shared admin users.
  • Pod Identity per app; block pods from using the node role (IMDSv2 hop limit 1 โ€” AL2023 default).
  • Pod Security Standards: label namespaces pod-security.kubernetes.io/enforce=restricted (or baseline).
  • KMS envelope encryption for Secrets; secrets in Secrets Manager.
  • Scan images in ECR; run Amazon GuardDuty EKS Protection / Runtime Monitoring.
  • Policy engine (Kyverno or OPA Gatekeeper) to block risky YAML.
  • Audit logs on.

Key takeaways

  • Access entries = who gets into the cluster.
  • Pod Identity = what a pod can do in AWS.
  • RBAC = what someone can do inside Kubernetes.
Level 4 ยท Operate

Add-ons: The Usual Toolkit

You will learn: what add-ons are, which ones almost every cluster runs, and how to install and update them.

An add-on is extra software that gives the cluster abilities (networking, DNS, storage, monitoring). EKS add-ons are installed and version-tested by AWS through the EKS API. Others are installed with Helm.

The typical add-on list

Add-onWhat it does (simple)How to installAuto Mode?
Amazon VPC CNI (vpc-cni)Gives pods VPC IP addressesEKS add-on (default)Built in
CoreDNSName lookups inside the clusterEKS add-on (default)Built in
kube-proxyRoutes Service traffic on each nodeEKS add-on (default)Built in
EKS Pod Identity AgentHands IAM credentials to podsEKS add-onBuilt in
Amazon EBS CSI driverCreates EBS disks for PVCsEKS add-onBuilt in
AWS Load Balancer ControllerCreates ALBs/NLBs for Ingress/ServicesHelmBuilt in
Karpenter or Cluster AutoscalerAdds/removes nodesHelmBuilt in
Node monitoring agentDetects node health problems; enables auto repairEKS add-onBuilt in
Metrics ServerCPU/memory numbers for HPA and kubectl topEKS add-on or HelmInstall it
Amazon EFS CSI driverShared file storageEKS add-onInstall if needed
Mountpoint for Amazon S3 CSIMount S3 bucketsEKS add-onInstall if needed
CSI snapshot controllerVolume snapshotsEKS add-onInstall if needed
Amazon CloudWatch ObservabilityContainer Insights metrics + logs (Fluent Bit)EKS add-onInstall it
AWS Distro for OpenTelemetry (ADOT)Traces/metrics to X-Ray, Prometheus, etc.EKS add-onOptional
GuardDuty runtime agentThreat detection on nodesEKS add-on (via GuardDuty)Optional
ExternalDNSCreates Route 53 DNS recordsEKS community add-on or HelmOptional
cert-managerIssues TLS certificates automaticallyAdd-on catalog or HelmOptional
Secrets Store CSI Driver + AWS providerLoads Secrets Manager / Parameter Store values into podsEKS add-on or HelmOptional
Argo CD / ACK / kroGitOps; manage AWS resources with YAML; build composite resourcesEKS Capabilities (AWS-managed) or HelmOptional

โ–ถ๏ธ Walkthrough: find, install, and update an add-on

Terminal
aws eks list-addons --cluster-name demo-std
{
    "addons": [ "coredns", "eks-pod-identity-agent", "kube-proxy", "metrics-server", "vpc-cni", "aws-ebs-csi-driver" ]
}
What's installed? Lists EKS-managed add-ons on the cluster.
aws eks describe-addon-versions --addon-name vpc-cni --kubernetes-version 1.36 \
    --query "addons[].addonVersions[].[addonVersion, compatibilities[0].defaultVersion]" --output table
-------------------------------
|    DescribeAddonVersions    |
+------------------+----------+
|  v1.2x.y-eksbuild.1 |  False |
|  v1.2x.x-eksbuild.1 |  True  |
|  ...                |  ...   |
+------------------+----------+
Which versions work with my Kubernetes version? True marks AWS's default. Newer ones may be available.
aws eks create-addon --cluster-name demo-std --addon-name aws-efs-csi-driver \
    --pod-identity-associations serviceAccount=efs-csi-controller-sa,roleArn=arn:aws:iam::111122223333:role/EfsCsiRole
{
    "addon": {
        "addonName": "aws-efs-csi-driver",
        "status": "CREATING",
        "addonVersion": "v2.x.x-eksbuild.1",
        ...
    }
}
Install: Add the EFS driver and give its service account an IAM role through Pod Identity in the same command.
aws eks update-addon --cluster-name demo-std --addon-name vpc-cni \
    --addon-version v1.2x.y-eksbuild.1 --resolve-conflicts PRESERVE
{
    "update": { "id": "7f1c...", "status": "InProgress", "type": "AddonUpdate", ... }
}
aws eks describe-addon --cluster-name demo-std --addon-name vpc-cni --query "addon.[addonVersion,status]"
[ "v1.2x.y-eksbuild.1", "ACTIVE" ]
Update: PRESERVE keeps any settings you changed by hand. Status goes UPDATING โ†’ ACTIVE. Update add-ons one at a time and check health after each.
Change add-on settings with --configuration-values. Example: aws eks update-addon --cluster-name demo-std --addon-name coredns --configuration-values '{"replicaCount":3}'. See the allowed fields with aws eks describe-addon-configuration --addon-name coredns --addon-version VERSION.

Key takeaways

  • VPC CNI, CoreDNS, kube-proxy, Pod Identity Agent, and EBS CSI are near-universal.
  • Add the LB Controller, an autoscaler, Metrics Server, and CloudWatch Observability on standard clusters.
  • Auto Mode bundles most of the core list.
Level 4 ยท Operate

Monitoring & Logs

You will learn: the three kinds of signals (metrics, logs, traces), the AWS tools for each, and the first commands to run when something looks wrong.

๐Ÿ“ˆ Metrics

Numbers over time: CPU, memory, requests per second. "How busy?"

๐Ÿ“œ Logs

Text lines your apps and the cluster write. "What happened?"

๐Ÿงต Traces

The path of one request through many services. "Where is it slow?"

AWS options

NeedAWS-native choiceOpen-source choice
Cluster/node/pod metricsCloudWatch Container Insights (CloudWatch Observability add-on)Prometheus โ†’ Amazon Managed Service for Prometheus
DashboardsCloudWatch dashboards; EKS console Observability tabAmazon Managed Grafana
App logsFluent Bit (in the add-on) โ†’ CloudWatch LogsFluent Bit โ†’ OpenSearch / Loki
Control plane logsEKS control plane logging โ†’ CloudWatch Logsโ€”
TracesADOT โ†’ AWS X-Ray / CloudWatch Application SignalsOpenTelemetry โ†’ Jaeger/Tempo
Upgrade/config problemsCluster insightsPluto, kubent
Turn on monitoring
# Container Insights + logs
aws eks create-addon --cluster-name demo --addon-name amazon-cloudwatch-observability
# Control plane logs (audit + authenticator)
aws eks update-cluster-config --name demo \
  --logging '{"clusterLogging":[{"types":["audit","authenticator","api"],"enabled":true}]}'
# Set log retention so costs don't grow forever
aws logs put-retention-policy --log-group-name /aws/eks/demo/cluster --retention-in-days 30

First-response commands

Terminal
kubectl get nodes                                       # any NotReady?
kubectl get pods -A | grep -v Running                    # anything unhappy?
kubectl top nodes                                       # who is busy?
kubectl top pods -A --sort-by=memory | head             # memory hogs
kubectl get events -A --sort-by=.lastTimestamp | tail -20 # what just happened
kubectl logs deploy/hello -n shop --tail=50              # app output

Key takeaways

  • Turn on Container Insights (or Prometheus) and audit logs on day one.
  • Set log retention.
  • Events + logs + top solve most problems.
Level 4 ยท Operate

Patching: Keeping Everything Up to Date

You will learn: the four layers to patch, how node patching really works (replace, not repair), and how to do it with zero downtime.

The four layers

LayerWho patchesHow
1. Control planeAWSAutomatic platform version updates (eks.N). Nothing to do.
2. Nodes (OS + kubelet)You (standard) / AWS (Auto Mode)Replace nodes with a newer AMI.
3. Add-onsYou (standard) / AWS for built-ins (Auto Mode)aws eks update-addon / helm upgrade
4. Your apps & imagesYouRebuild on a patched base image; redeploy.
You don't fix a node; you replace it. Like swapping a rental car for a newer one instead of repairing the old one in the parking lot. Nodes are "cattle, not pets."

How a managed node group update works

1. Launch new nodes with new AMI
โ†’
2. Cordon old node
(no new pods)
โ†’
3. Drain old node
(evict pods, respecting PDBs)
โ†’
4. Pods restart on new nodes
โ†’
5. Terminate old node
โ†บ repeat

โ–ถ๏ธ Walkthrough: patch a managed node group

Terminal
aws eks describe-nodegroup --cluster-name demo-std --nodegroup-name ng-general \
    --query "nodegroup.[version,releaseVersion,amiType]"
[ "1.36", "1.36.x-20261001", "AL2023_x86_64_STANDARD" ]
Where are we? releaseVersion is the AMI build. The console shows "Update now" on the node group when a newer AMI exists.
aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.36/amazon-linux-2023/x86_64/standard/recommended/release_version \
    --query Parameter.Value --output text
1.36.x-20261110
What's the latest? AWS publishes the newest EKS-optimized AMI version in SSM Parameter Store. Newer than ours โ†’ time to patch.
aws eks update-nodegroup-version --cluster-name demo-std --nodegroup-name ng-general
{
    "update": {
        "id": "a2b9...",
        "status": "InProgress",
        "type": "VersionUpdate",
        "params": [
            { "type": "Version", "value": "1.36" },
            { "type": "ReleaseVersion", "value": "1.36.x-20261110" }
        ]
    }
}
Go! With no version flags, EKS uses the latest AMI for the node group's current Kubernetes version. Nodes are replaced according to maxUnavailable.
kubectl get nodes -w
NAME                                         STATUS                     VERSION
ip-192-168-101-12.us-west-2.compute.internal Ready                      v1.36.x-eks-aaa
ip-192-168-140-77.us-west-2.compute.internal Ready                      v1.36.x-eks-aaa
ip-192-168-120-5.us-west-2.compute.internal  Ready                      v1.36.x-eks-bbb   โ† new
ip-192-168-101-12.us-west-2.compute.internal Ready,SchedulingDisabled   v1.36.x-eks-aaa   โ† cordoned
...
Watch it happen: New nodes appear, old ones are marked SchedulingDisabled (cordoned), drained, then removed.
aws eks describe-update --name demo-std --nodegroup-name ng-general --update-id a2b9...
{ "update": { "status": "Successful", ... } }
Done. If it shows Failed with PodEvictionFailure, a PodDisruptionBudget blocked draining (e.g., minAvailable equals replicas). Fix the PDB, or as a last resort use --force.

Patching with other node types

Node typeHow patching works
Auto ModeAutomatic. Nodes are replaced with patched images, and no node lives longer than 21 days. Control timing with NodePool disruption budgets (e.g., only during a maintenance window) and protect apps with PDBs.
KarpenterKarpenter's drift feature replaces nodes when the AMI in the EC2NodeClass changes. Use expireAfter to force regular refreshes.
Self-managedUpdate the launch template AMI; do an Auto Scaling group instance refresh; drain nodes yourself.
FargateAWS patches the hosts. Pods may be evicted and restarted to apply patches โ€” PDBs help.
Make patching boring: every app has โ‰ฅ2 replicas, a PDB, readiness probes, and handles SIGTERM (graceful shutdown). Then you can patch any time of day.

Key takeaways

  • AWS patches the control plane; you (or Auto Mode) patch nodes by replacing them.
  • aws eks update-nodegroup-version rolls new AMIs.
  • PDBs + replicas = zero-downtime patching.
Level 5 ยท Expert

Upgrading EKS (Kubernetes Versions)

You will learn: the rules of EKS upgrades, a step-by-step runbook with an interactive checklist, cluster insights, and the 7-day rollback.

The rules

  • One minor version at a time (1.35 โ†’ 1.36 โ†’ 1.37). No skipping.
  • Control plane first, then nodes, then add-ons.
  • Nodes can't be newer than the control plane. kubelet may be up to a few minor versions older (check the version skew policy for your version), but keep them close.
  • Kubernetes removes old APIs in some versions. YAML using them will fail after upgrade.
  • You can roll back the control plane one minor version within 7 days of an in-place upgrade (with conditions).

The upgrade flow

๐Ÿ” 1. Read release notes & insights
โ†’
๐Ÿงน 2. Fix deprecated APIs
โ†’
๐Ÿงช 3. Test in non-prod
โ†’
๐Ÿง  4. Upgrade control plane
โ†’
๐Ÿ–ฅ๏ธ 5. Upgrade nodes
โ†’
๐Ÿงฉ 6. Upgrade add-ons
โ†’
โœ… 7. Verify

โœ… Interactive upgrade checklist

Upgrade 1.36 โ†’ 1.370%

โ–ถ๏ธ Walkthrough: the actual upgrade

Terminal โ€” upgrading demo-std from 1.36 to 1.37
aws eks list-insights --cluster-name demo-std --filter '{"categories":["UPGRADE_READINESS"]}' \
    --query "insights[].[name,insightStatus.status]" --output table
-----------------------------------------------------------------
|                         ListInsights                          |
+-------------------------------------------------+-------------+
|  Deprecated APIs removed in Kubernetes v1.37    |  PASSING    |
|  Kubelet version skew                           |  PASSING    |
|  EKS add-on version compatibility               |  WARNING    |
|  Cluster health issues                          |  PASSING    |
+-------------------------------------------------+-------------+
Ask EKS what will break. Cluster insights scan your audit logs (30-day window) for deprecated APIs and check add-on and node versions. Fix every ERROR; review WARNINGs. Get details with aws eks describe-insight --cluster-name demo-std --id ID.
aws eks update-addon --cluster-name demo-std --addon-name vpc-cni --addon-version <version-compatible-with-1.37>
{ "update": { "status": "InProgress", "type": "AddonUpdate", ... } }
Fix warnings. Here, the VPC CNI version was too old for 1.37. Some add-ons must be updated before the control plane; others after. Insights tell you which.
aws eks update-cluster-version --name demo-std --kubernetes-version 1.37
{
    "update": {
        "id": "b5f0e4f2-...",
        "status": "InProgress",
        "type": "VersionUpdate",
        "params": [
            { "type": "Version", "value": "1.37" },
            { "type": "PlatformVersion", "value": "eks.1" }
        ],
        "errors": []
    }
}
Upgrade the control plane. Takes several minutes. Cluster status goes ACTIVE โ†’ UPDATING โ†’ ACTIVE. Running apps keep working; the API may briefly hiccup. If EKS's health checks fail, it automatically reverts.
aws eks describe-update --name demo-std --update-id b5f0e4f2-...
{ "update": { "status": "Successful", "type": "VersionUpdate", ... } }
kubectl version
Client Version: v1.37.x
Server Version: v1.37.x-eks-xxxxxxx
Confirm. Server version is now 1.37.
aws eks update-nodegroup-version --cluster-name demo-std --nodegroup-name ng-general --kubernetes-version 1.37
{ "update": { "status": "InProgress", "type": "VersionUpdate", ... } }
# eksctl equivalent: eksctl upgrade nodegroup --cluster demo-std --name ng-general --kubernetes-version 1.37
Upgrade nodes. Same rolling replacement as patching, but to 1.37 AMIs. Karpenter nodes: update the EC2NodeClass AMI (drift does the rest). Auto Mode: nodes follow the control plane automatically.
for a in coredns kube-proxy eks-pod-identity-agent aws-ebs-csi-driver metrics-server; do
  v=$(aws eks describe-addon-versions --addon-name $a --kubernetes-version 1.37 \
      --query "addons[0].addonVersions[?compatibilities[0].defaultVersion]|[0].addonVersion" --output text)
  echo "updating $a -> $v"
  aws eks update-addon --cluster-name demo-std --addon-name $a --addon-version $v --resolve-conflicts PRESERVE >/dev/null
done
updating coredns -> v1.1x.x-eksbuild.1
updating kube-proxy -> v1.37.x-eksbuild.1
updating eks-pod-identity-agent -> v1.3.x-eksbuild.1
updating aws-ebs-csi-driver -> v1.5x.x-eksbuild.1
updating metrics-server -> v0.8.x-eksbuild.1
Upgrade add-ons to each one's default version for 1.37. kube-proxy should match the cluster's minor version. Also helm upgrade any Helm add-ons (LB Controller, Karpenter) to versions that support 1.37.
kubectl get nodes
NAME                                          STATUS   VERSION
ip-192-168-120-5.us-west-2.compute.internal   Ready    v1.37.x-eks-ccc
ip-192-168-151-9.us-west-2.compute.internal   Ready    v1.37.x-eks-ccc
kubectl get pods -A | grep -v -E "Running|Completed"
NAMESPACE   NAME   READY   STATUS   RESTARTS   AGE
Verify. All nodes on 1.37, no unhealthy pods. Run your app smoke tests. ๐ŸŽ‰

Something went wrong? Roll back (within 7 days)

EKS can roll the control plane back one minor version within 7 days of an in-place upgrade. etcd data, workloads, and volumes are kept. Not rolled back: add-ons, managed node groups, self-managed nodes (do those yourself โ€” nodes first, since nodes can't be newer than the control plane). Auto Mode nodes are rolled back for you.

Terminal
# 1. Check rollback readiness
aws eks list-insights --cluster-name demo-std --filter '{"categories":["ROLLBACK_READINESS"]}'
# 2. Roll back managed node groups to 1.36 first (if they were upgraded)
aws eks update-nodegroup-version --cluster-name demo-std --nodegroup-name ng-general --kubernetes-version 1.36
# 3. Roll back the control plane (same command, previous version)
aws eks update-cluster-version --name demo-std --kubernetes-version 1.36
{ "update": { "status": "InProgress", "type": "VersionRollback", ... } }
Console: cluster โ†’ Actions โ†’ Rollback cluster version. You cannot roll back a cluster that was created at its current version, or one auto-upgraded at the end of extended support.

Upgrade strategies

In-place (above)

Upgrade the same cluster. Simple, cheap. Now has a 7-day rollback safety net.

Blue/green

Build a new cluster on the new version, move traffic over (DNS weights or GitOps), then delete the old one. Safest for big jumps, costs more, needs everything in code.
Use the Upgrade policy wisely: set STANDARD on non-prod so they auto-upgrade first and warn you of problems; upgrade prod on your own schedule before standard support ends.

Key takeaways

  • Insights โ†’ control plane โ†’ nodes โ†’ add-ons โ†’ verify.
  • One minor version at a time; plan around the support calendar.
  • Rollback exists for 7 days, for the control plane.
Level 5 ยท Expert

EKS Auto Mode vs Standard EKS

You will learn: exactly what Auto Mode changes, a side-by-side comparison, and how to choose.

EKS Auto Mode extends AWS's management from the control plane to the data plane: nodes, autoscaling (Karpenter-based), load balancing, EBS storage, pod networking, DNS, Pod Identity, and GPU drivers. Standard EKS gives you the control plane and leaves the rest to you.

๐Ÿ“Š Comparison chart

AreaStandard EKS (managed node groups / Karpenter)EKS Auto ModeFargate
Control planeAWS-managedAWS-managedAWS-managed
Node provisioningYou configure node groups or install KarpenterAutomatic (built-in Karpenter)No nodes to manage (1 pod = 1 micro-VM)
Node OS / AMIYou choose: AL2023, Bottlerocket, Windows, customAWS-chosen Bottlerocket-based, locked (read-only root, SELinux)AWS-managed
OS patchingYou trigger AMI updatesAutomatic; max node lifetime 21 daysAWS
Core add-ons (VPC CNI, CoreDNS, kube-proxy, Pod Identity, EBS CSI)You install & upgrade (EKS add-ons)Built in, AWS upgradesPartially (you manage CoreDNS etc.)
Load balancersInstall AWS Load Balancer ControllerBuilt inNeeds LB Controller (IP targets)
Block storage (EBS)Install EBS CSI add-onBuilt inNot supported (EFS only)
GPU / ML chipsYou choose GPU AMIs + device pluginsNVIDIA & Neuron drivers includedNo
SSH / SSM into nodesAllowedNot allowed (debug via kubectl)No
DaemonSetsYesYesNo (use sidecars)
Custom AMIs / user dataYesNo (NodeClass options only)No
Spot instancesYesYes (via NodePool)No (Fargate Spot is ECS-only)
Node health repairOptional (node auto repair)Built inAWS
Kubernetes upgradesYou upgrade control plane, then nodes, then add-onsYou upgrade control plane; nodes & built-in components followYou upgrade control plane; restart pods
Price$0.10/hr cluster + EC2$0.10/hr cluster + EC2 + Auto Mode fee per managed instance (not reduced by EC2 discounts)$0.10/hr cluster + per-pod vCPU/memory pricing
Operational effortHighLowLow
Control / flexibilityHighestMediumLowest
Best forTeams needing custom OS, special networking, deep tuningMost new workloads; small/medium platform teamsSmall, isolated, bursty pods

Things that are different in Auto Mode (gotchas)

  • Built-in API groups and names: StorageClass provisioner ebs.csi.eks.amazonaws.com, IngressClass controller eks.amazonaws.com/alb, Service loadBalancerClass: eks.amazonaws.com/nlb, NodeClass group eks.amazonaws.com.
  • Built-in node pools general-purpose and system can be enabled/disabled but not edited โ€” create your own NodePools for Spot, ARM, or GPU.
  • The cluster IAM role needs extra policies (Compute, BlockStorageV2, LoadBalancing, Networking); a node IAM role is required.
  • Nodes are replaced regularly (โ‰ค21 days). Apps must tolerate restarts โ€” use replicas and PDBs.
  • You can turn Auto Mode on for an existing cluster and migrate workloads gradually from node groups.

๐ŸŽฏ Decision helper

Tick what is true for you:

Tick some boxes to get a suggestion.

Enable Auto Mode on an existing cluster

Terminal
# Cluster role must first have the extra Auto Mode policies attached.
aws eks update-cluster-config --name demo-std \
  --compute-config '{"enabled":true,"nodeRoleArn":"arn:aws:iam::111122223333:role/AmazonEKSAutoNodeRole","nodePools":["general-purpose","system"]}' \
  --kubernetes-network-config '{"elasticLoadBalancing":{"enabled":true}}' \
  --storage-config '{"blockStorage":{"enabled":true}}'
Then move workloads off managed node groups (cordon/drain or scale the groups down) so pods land on Auto Mode nodes. Existing load balancers made by the LB Controller are not taken over automatically โ€” plan their migration.

Key takeaways

  • Auto Mode = AWS also runs your nodes and core add-ons.
  • Trade-off: less control and an extra fee, for much less work.
  • Great default for new clusters.
Level 5 ยท Expert

Expert Operations

You will learn: how to debug the most common failures, cost and reliability best practices, multi-cluster patterns, and how to clean up.

๐Ÿฉบ Troubleshooting guide (click to expand)

Pod stuck in Pending

Meaning: no node can take it. Check: kubectl describe pod โ†’ Events. Common reasons: Insufficient cpu/memory (autoscaler not working or at max), node selector/taint mismatch, PVC in a different AZ, too many pods per node (IP limit). Fix: lower requests, raise NodePool limits / node group max, fix labels/tolerations.

ImagePullBackOff / ErrImagePull

Wrong image name/tag, image not in that Region, node role missing ECR pull permissions, cross-account repo policy missing, private subnets with no NAT or VPC endpoints (ecr.api, ecr.dkr, S3 gateway), or architecture mismatch (ARM image on x86 node shows exec format error after pulling).

CrashLoopBackOff

The app starts and dies repeatedly. Run kubectl logs POD --previous. Usually a missing env var/secret, bad config, failing liveness probe (too strict), or OOMKilled (raise memory limit โ€” see kubectl describe pod "Last State").

Node NotReady

kubelet can't reach the API server or the node is unhealthy. Check the node's security groups, VPC CNI pods (kubectl -n kube-system get pods -l k8s-app=aws-node), disk pressure, and the EKS console's node health issues. Node auto repair can replace it.

Unauthorized / Forbidden with kubectl

Unauthorized = your IAM identity has no access entry (or wrong AWS profile/Region โ€” run aws sts get-caller-identity). Forbidden = you're known but lack RBAC/access policy for that action.

Ingress has no ADDRESS

kubectl describe ingress. Usually: subnets missing kubernetes.io/role/elb tags, LB Controller missing IAM permissions or not running, wrong ingressClassName, or Service name/port typo.

Pods can't get an IP (failed to assign an IP address)

Subnet is out of IPs or the instance hit its ENI limit. Turn on prefix delegation, add subnets/secondary CIDR, or use larger instance types.

Node group update fails with PodEvictionFailure

A PDB blocked draining. Check kubectl get pdb -A for ALLOWED DISRUPTIONS = 0. Scale the app up or relax the PDB, then retry.

Can't delete the VPC after deleting the cluster

Load balancers or ENIs made by the cluster are still there. Always delete Services of type LoadBalancer and Ingresses before deleting the cluster.

Best practices that separate experts from beginners

๐Ÿ›ก๏ธ Reliability

  • โ‰ฅ2 replicas, PDBs, probes, topology spread across 3 AZs
  • Graceful shutdown (handle SIGTERM, preStop hook)
  • Turn on ARC zonal shift
  • Back up with AWS Backup or Velero; test restores

๐Ÿ’ฐ Cost

  • Right-size requests (look at real usage)
  • Spot + Graviton for flexible work
  • Consolidation in Karpenter/Auto Mode
  • Stay in standard support (6ร— cheaper control plane)
  • ECR lifecycle policies; log retention; VPC endpoints vs NAT costs

๐Ÿ” Security

  • Private endpoint, access entries, Pod Identity
  • Pod Security Standards + Kyverno/Gatekeeper
  • Signed, scanned images from ECR
  • GuardDuty, audit logs, KMS secrets encryption

โš™๏ธ Operations

  • Everything in code (Terraform/CDK + GitOps)
  • Upgrade at least twice a year; non-prod first
  • Patch nodes monthly (or let Auto Mode do it)
  • Use EKS cluster insights before every change

Multi-cluster & advanced topics

TopicOne-line summary
Multi-tenancyNamespaces + RBAC + quotas (ResourceQuota, LimitRange) + network policies โ€” or separate clusters for hard isolation.
Multi-Region / DRClusters in two Regions, ECR replication, GitOps to keep them in sync, Route 53 failover.
EKS CapabilitiesAWS-managed Argo CD, ACK (create AWS resources like RDS/S3 from Kubernetes YAML), and kro โ€” running on AWS-owned infrastructure.
Provisioned Control PlanePre-sized, higher-capacity control plane tiers for very large clusters.
EKS Hybrid NodesJoin on-prem servers to an EKS cluster.
EKS Anywhere / EKS on OutpostsRun EKS-style clusters in your own data center or on AWS Outposts.
Windows nodesRun Windows containers in managed node groups (needs a Linux node group too for system pods).

๐Ÿงน Clean up & leftover check (avoid surprise bills)

If you only built a practice cluster, its teardown above is all you need. Use this section if you followed the later lessons (ECR, load balancers, storage, IAM roles), or just want to double-check. First tear down your cluster(s) with the matching guide: Teardown A (Auto Mode) and B (Standard) on the First Cluster page, or Teardown C (Console) on the Console Tour page. Then delete the things that live outside any cluster, and run the leftover check.

1. Shared resources from the lessons

Terminal
# ECR repository and all its images (storage is billed per GB-month)
aws ecr delete-repository --repository-name hello-app --force
# Local Docker images (free, but frees disk space)
docker rmi hello-app:1.0 111122223333.dkr.ecr.us-west-2.amazonaws.com/hello-app:1.0
# IAM roles you created by hand (detach policies first, then delete)
aws iam list-attached-role-policies --role-name ShopS3Read
aws iam detach-role-policy --role-name ShopS3Read --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
aws iam delete-role --role-name ShopS3Read

2. Leftover check: run this in every Region you used

Each command should come back empty. If it doesn't, delete what's listed.

Walkthrough: find anything still costing money
export AWS_REGION=us-west-2
aws eks list-clusters
{ "clusters": [] }
Clusters โ€” $0.10โ€“$0.60 per hour each. Should be empty.
aws ec2 describe-instances --filters Name=instance-state-name,Values=running,pending     --query "Reservations[].Instances[].[InstanceId,InstanceType]" --output table
(no output)
EC2 instances โ€” leftover nodes from Karpenter, self-managed groups, or a failed delete. Terminate any you don't recognize as yours to keep.
aws elbv2 describe-load-balancers --query "LoadBalancers[].[LoadBalancerName,Type]" --output table
(no output)
Load balancers โ€” names starting with k8s- came from your cluster. Delete them in EC2 โ†’ Load Balancers. They also block VPC deletion.
aws ec2 describe-volumes --filters Name=status,Values=available --query "Volumes[].[VolumeId,Size,CreateTime]" --output table
(no output)
Unattached EBS volumes โ€” from PVCs with reclaimPolicy: Retain or a cluster deleted before its PVCs. "available" means not attached to anything but still billed.
aws ec2 describe-nat-gateways --filter Name=state,Values=available --query "NatGateways[].[NatGatewayId,VpcId]" --output table
aws ec2 describe-addresses --query "Addresses[?AssociationId==null].[PublicIp,AllocationId]" --output table
(no output)
NAT gateways and unused Elastic IPs โ€” both bill by the hour even when idle. Usually removed with the VPC stack. If one remains, delete the VPC's CloudFormation stack, or delete the NAT gateway and release the IP.
aws cloudformation list-stacks --stack-status-filter DELETE_FAILED CREATE_COMPLETE     --query "StackSummaries[?contains(StackName,'eks')].[StackName,StackStatus]" --output table
(no output)
Leftover or stuck stacks โ€” DELETE_FAILED usually means a load balancer or ENI was still in the VPC. Delete that resource, then delete the stack again.
aws logs describe-log-groups --log-group-name-prefix /aws/eks --query "logGroups[].logGroupName"
aws logs describe-log-groups --log-group-name-prefix /aws/containerinsights --query "logGroups[].logGroupName"
aws ecr describe-repositories --query "repositories[].repositoryName"
aws efs describe-file-systems --query "FileSystems[].[FileSystemId,Name]"
[]
Logs, images, file systems โ€” none of these are deleted with a cluster. Delete any that are listed (aws logs delete-log-group, aws ecr delete-repository --force, or the EFS console).
Safety net: before you start practicing, create a small monthly budget (for example $20) in Billing โ†’ Budgets with an email alert. Then, a day after your teardown, check Cost Explorer (grouped by service) to make sure EKS, EC2, ELB and VPC costs have stopped.

๐Ÿ† Final exam

You made it!

You can now explain EKS, build clusters, push images to ECR, deploy and expose apps, set up storage, security, add-ons, monitoring, patch nodes, upgrade and roll back versions, and choose between Auto Mode and standard EKS. Next step: rebuild everything with Terraform or CDK and GitOps โ€” that is how expert teams run EKS.

Reference

Command Reference: Manage & Troubleshoot EKS

Use this page: to check who kubectl thinks you are, switch clusters safely, and find the right kubectl, aws, eksctl or helm command for everyday work and troubleshooting.

๐Ÿชช "Who am I?" How kubectl sees you

When you run a kubectl command on EKS, several things happen in a chain. Knowing the chain tells you where to look when access fails.

1๏ธโƒฃ Context
kubeconfig: which cluster + which user entry
โ†’
2๏ธโƒฃ AWS identity
aws eks get-token runs with your AWS profile
โ†’
3๏ธโƒฃ Access entry
cluster maps your IAM ARN to a Kubernetes user + groups
โ†’
4๏ธโƒฃ Permissions
access policies + RBAC decide what you can do
Walkthrough: check your identity at every link of the chain
kubectl config current-context
arn:aws:eks:us-west-2:111122223333:cluster/demo
kubectl config get-contexts
CURRENT   NAME                                                  CLUSTER                                               AUTHINFO                                              NAMESPACE
*         arn:aws:eks:us-west-2:111122223333:cluster/demo       arn:aws:eks:us-west-2:111122223333:cluster/demo       arn:aws:eks:us-west-2:111122223333:cluster/demo
          arn:aws:eks:us-west-2:111122223333:cluster/demo-std   arn:aws:eks:us-west-2:111122223333:cluster/demo-std   arn:aws:eks:us-west-2:111122223333:cluster/demo-std   shop
Link 1 โ€” Which cluster am I pointed at? The * marks the active context. A context = cluster + user (AUTHINFO) + optional default namespace. Always check this before running delete or apply, especially if you have prod and test clusters.
kubectl config view --minify
clusters:
- cluster:
    server: https://ABCD1234EXAMPLE.gr7.us-west-2.eks.amazonaws.com
  name: arn:aws:eks:us-west-2:111122223333:cluster/demo
contexts:
- context:
    cluster: arn:aws:eks:us-west-2:111122223333:cluster/demo
    user: arn:aws:eks:us-west-2:111122223333:cluster/demo
users:
- name: arn:aws:eks:us-west-2:111122223333:cluster/demo
  user:
    exec:
      command: aws
      args: [--region, us-west-2, eks, get-token, --cluster-name, demo, --output, json]
      env:
      - name: AWS_PROFILE
        value: eks-admin
Link 1, in detail. --minify shows only the active context. The exec section is the key part: kubectl runs aws eks get-token to sign in. If there's an AWS_PROFILE entry, that profile is used. If not, whatever AWS credentials your shell currently has are used. Different terminals can therefore be different people!
aws sts get-caller-identity
{
    "UserId": "AROAEXAMPLEID:alex",
    "Account": "111122223333",
    "Arn": "arn:aws:sts::111122223333:assumed-role/AWSReservedSSO_AdministratorAccess_abc123/alex"
}
Link 2 โ€” Which AWS identity am I? This is the identity get-token uses (unless the kubeconfig sets a different AWS_PROFILE; check with AWS_PROFILE=eks-admin aws sts get-caller-identity). Also confirm the Account is the one the cluster lives in.
kubectl auth whoami
ATTRIBUTE              VALUE
Username               arn:aws:sts::111122223333:assumed-role/AWSReservedSSO_AdministratorAccess_abc123/alex
UID                    aws-iam-authenticator:111122223333:AROAEXAMPLEID
Groups                 [system:authenticated]
Extra: arn             [arn:aws:sts::111122223333:assumed-role/AWSReservedSSO_AdministratorAccess_abc123/alex]
Extra: canonicalArn    [arn:aws:iam::111122223333:role/AWSReservedSSO_AdministratorAccess_abc123]
Extra: sessionName     [alex]
Link 3 โ€” Who does the cluster think I am? This is the most direct answer. The Username and Groups are what Kubernetes uses for permissions. canonicalArn is the IAM role your access entry must match. (Example output; your fields will differ. If you get Unauthorized, there is no access entry for that ARN.)
aws eks list-associated-access-policies --cluster-name demo \
    --principal-arn arn:aws:iam::111122223333:role/AWSReservedSSO_AdministratorAccess_abc123
{
    "associatedAccessPolicies": [
        { "policyArn": "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy",
          "accessScope": { "type": "cluster", "namespaces": [] } }
    ]
}
Link 4a โ€” Which EKS access policies do I have? Use the canonicalArn (the role, not the session) as the principal. Here: cluster admin across the whole cluster.
kubectl auth can-i delete pods -n shop
yes
kubectl auth can-i --list -n shop | head
Resources   Non-Resource URLs   Resource Names   Verbs
*.*         []                  []               [*]
...
Link 4b โ€” What can I actually do? can-i checks one action; --list shows everything you're allowed in that namespace. Admins can test another user with --as / --as-group.
Avoid "wrong cluster" accidents: give contexts short names (aws eks update-kubeconfig --name demo --alias demo --profile eks-admin), set a default namespace per context (kubectl config set-context --current --namespace=shop), and show the current context in your shell prompt (tools like kube-ps1, or Starship).

๐Ÿ“š Command cheat sheet

Type to search, or click a category. Click Copy to copy a command. Replace demo, shop, POD, NODE etc. with your own names.

๐Ÿฉบ Symptom โ†’ first commands

SymptomRun these firstLook for
Unauthorized from kubectlkubectl config current-context
aws sts get-caller-identity
aws eks list-access-entries --cluster-name demo
Wrong cluster/profile/account/Region, or your role has no access entry.
Forbidden from kubectlkubectl auth whoami
kubectl auth can-i VERB RESOURCE -n NS
Known identity, but the access policy or RBAC doesn't allow that action or namespace.
Pod Pendingkubectl describe pod POD
kubectl get nodepools,nodeclaims (Auto Mode/Karpenter)
Events: Insufficient cpu/memory, taints, node selector, volume AZ, NodePool limits.
ImagePullBackOffkubectl describe pod POD
aws ecr describe-images --repository-name REPO
Typo in image/tag, wrong Region, missing ECR permission, no network route to ECR.
CrashLoopBackOffkubectl logs POD --previous
kubectl describe pod POD
App error, missing config/secret, OOMKilled, failing liveness probe.
Service not reachablekubectl get endpointslices -n NS -l kubernetes.io/service-name=SVC
kubectl describe ingress ING -n NS
No endpoints = selector doesn't match pod labels or pods aren't Ready. Ingress events show LB errors.
Node NotReadykubectl describe node NODE
kubectl -n kube-system get pods -o wide | grep NODE
Conditions (DiskPressure, MemoryPressure), aws-node/kube-proxy pods failing.
Upgrade or update failedaws eks list-updates --name demo
aws eks describe-update --name demo --update-id ID
aws eks list-insights --cluster-name demo
The update's error list; insights with ERROR status.
Reference

Glossary & Sources