Overview

Starting point: a working k8s/ directory that runs on Minikube.

Goal: refactor every component to be production-ready on EKS.

By the end of this lab your k8s/ directory will have:


2.1 — Images

The Problem

Your current deployments reference local image names:

image: mern-backend:latest

This works on Minikube because Minikube runs inside a single VM that shares your local Docker daemon. EKS nodes are real EC2 instances — they have no access to your local Docker daemon and cannot pull local images. They can only pull from a container registry.

What to Change

In backend/deployment.yaml and frontend/deployment.yaml, replace the local image name with the full ECR URI:

# Before
image: mern-backend:latest

# After
image: <account-id>.dkr.ecr.<region>.amazonaws.com/backend:latest
# Before
image: mern-frontend:latest

# After
image: <account-id>.dkr.ecr.<region>.amazonaws.com/frontend:latest

Replace <account-id> and <region> with your actual AWS account ID and region (e.g. eu-central-1).

Why No Credentials in the YAML?