~/
nmadiraju.com
Amazon EKS · Container images and Amazon ECR
arrow_back
Back to nmadiraju
Visual Walkthrough · Kubernetes basics
How Container Images and Amazon ECR Work on Amazon EKS
Follow the web app from your laptop to running Pods on EKS, then check yourself with 8 questions.
On this page
1
Visual Walkthrough
2
Quiz to check understanding
1
Visual Walkthrough
The web app built into an image on a laptop, pushed to Amazon ECR, and pulled by two EKS nodes
Left, you and your laptop with web's Dockerfile, the image's read-only layers and the source code. Middle, Amazon ECR repository web with its tags and digests, a pull-through cache rule for Docker Hub, and the node IAM role. Right, EKS cluster web-prod with Deployment web and two nodes, each with an image cache, web Pods and a shared Linux kernel. The walkthrough shows a crash from a different machine, building layers, a container's writable layer, tags and digests, pushing only new layers, lifecycle policies, nodes pulling with their IAM role and caching, the latest tag moving, and a multi-stage build shrinking the image.
You
docker · aws CLI
YOUR LAPTOP · DOCKER
Dockerfile
writable layer · this container only
web source code
server.js · package.json · runs on Node 22
AMAZON ECR · us-east-1
repository web
private · account 111122223333
TAG → IMAGE DIGEST
Pull-through cache rule
prefix docker-hub/
keeps copies of Docker Hub images
Docker Hub token in Secrets Manager
Docker Hub
public base images, e.g. node:22
Node IAM role
AmazonEC2ContainerRegistryPullOnly
lets each node pull from ECR
EKS CLUSTER web-prod
Deployment web · Pod template
Linux kernel · shared by every container here
Linux kernel · shared by every container here
MISSING ON NODE-1
▶ Play
Back
Next
Replay packet
Voice off
Whole cluster
2
Quiz to check understanding
Check yourself