Day 5 focused on understanding how a containerized application moves from source code to a running application on Amazon EKS.
Day 5: Docker → Amazon ECR → Amazon EKS As part of my AWS DevOps Community Builders learning journey.
The main focus was:

Docker → Amazon ECR → Amazon EKS
What I Learned Docker and containers
Dockerfiles
Docker images vs containers
Building Docker images
Image tagging
Amazon ECR
Pushing images to ECR
EKS pulling images from ECR
Kubernetes Deployments
Kubernetes Services
ECR authentication
Rolling updates
Liveness and readiness probes
GitLab CI/CD integration
- What is Docker? Docker allows us to package an application together with its dependencies into a container image.
The basic workflow:
Application Code ↓ Dockerfile ↓ Docker Build ↓ Docker Image ↓ Docker Container Example:
docker build -t myapp:1.0 . docker run -p 8080:8080 myapp:1.0 Docker helps create a consistent environment across development, testing, and production.
- Docker Image vs Container Docker Image: A packaged template containing the application and its dependencies.
Container: A running instance of that image.
Docker Image | +---- Container 1 | +---- Container 2 | +---- Container 3 3. What is Amazon ECR? Amazon Elastic Container Registry (Amazon ECR) is a managed AWS container registry.
Instead of keeping Docker images only on a developer's machine, we can push them to ECR.
Developer ↓ Docker Build ↓ Docker Image ↓ Amazon ECR ECR becomes the container image repository that Amazon EKS can pull images from.
- Docker → Amazon ECR Build the image:
docker build -t myapp:1.0 . Tag the image:
docker tag myapp:1.0 <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 Authenticate with ECR:
aws ecr get-login-password --region| docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr..amazonaws.com Push the image:
docker push <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 Now the image is available in Amazon ECR.
- ECR → Amazon EKS Kubernetes can use the ECR image in a Deployment:
apiVersion: apps/v1 kind: Deployment metadata: name: myapp spec: replicas: 3 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp image: <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 ports: - containerPort: 8080 The flow:
Amazon ECR ↓ EKS Node ↓ Container Image ↓ Pod ↓ Application 6. Kubernetes Deployment Deploy the application:
kubectl apply -f deployment.yaml Check the Pods:
kubectl get pods Example:
NAME READY STATUS myapp-7d9f8c6b7d-abc12 1/1 Running myapp-7d9f8c6b7d-def34 1/1 Running myapp-7d9f8c6b7d-ghi56 1/1 Running 7. Kubernetes Service Pods are dynamic, so we use a Kubernetes Service to provide a stable endpoint.
apiVersion: v1 kind: Service metadata: name: myapp-service spec: selector: app: myapp ports: - port: 80 targetPort: 8080 type: ClusterIP The architecture:
Application ↓ Kubernetes Service ↓ +------+------+------+ | | | | Pod Pod Pod 8. Rolling Updates Kubernetes Deployments allow applications to be updated gradually.
v1.0 ↓ Pod 1 → v2.0 Pod 2 → v1.0 Pod 3 → v1.0
↓
Pod 1 → v2.0 Pod 2 → v2.0 Pod 3 → v1.0
↓
Pod 1 → v2.0 Pod 2 → v2.0 Pod 3 → v2.0 This provides controlled application updates.
- Health Checks Kubernetes provides health probes to determine whether applications are healthy and ready.
Liveness Probe Checks whether the container is running correctly.
Readiness Probe Checks whether the application is ready to receive traffic.
Example:
livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 10
readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 5 periodSeconds: 5 10. GitLab CI/CD Integration Now the previous days start connecting together.
Developer ↓ GitLab ↓ GitLab CI/CD ↓ GitLab Runner ↓ Docker Build ↓ Security Scan ↓ Amazon ECR ↓ Amazon EKS ↓ Kubernetes Deployment ↓ Pods ↓ Service ↓ Application A developer can push code and trigger an automated process that builds the Docker image, pushes it to ECR, and deploys it to EKS.
Complete Architecture Developer | git push ↓ GitLab ↓ GitLab CI/CD ↓ GitLab Runner ↓ Docker Build ↓ Docker Image ↓ Amazon ECR ↓ Amazon EKS ↓ Kubernetes ↓ Deployment ↓ +---------+---------+ | | | Pod Pod Pod | | | +---------+---------+ ↓ Service ↓ Application Key Takeaway The complete workflow is:
Code → Build → Containerize → Scan → Push → Deploy → Run
Or:
GitLab → Docker → Amazon ECR → Amazon EKS → Kubernetes Pods → Service → Application
Docker packages the application.
Amazon ECR stores the container image.
Amazon EKS runs the application.
Kubernetes Deployment manages the Pods.
Kubernetes Service provides stable networking.
GitLab CI/CD automates the complete process.
The goal isn't just faster deployment.
The goal is to make deployment:
Repeatable, consistent, automated, and reliable.
Connecting Day 4 and Day 5 Day 3 Terraform ↓ AWS Infrastructure ↓ Day 4 IAM + OIDC ↓ Secure CI/CD Authentication ↓ Day 5 Docker ↓ Amazon ECR ↓ Amazon EKS Each day builds on the previous one.
What's Next? Day 6: Kubernetes Networking in Amazon EKS
Topics:
ClusterIP
NodePort
LoadBalancer
Ingress
AWS Load Balancer Controller
ALB
NLB
Kubernetes DNS
EKS VPC networking
End-to-end traffic flow
Learn → Build → Secure → Automate → Deploy → Improve
#AWS #AWSCommunityBuilders #DevOps #Docker #AmazonECR #AmazonEKS #Kubernetes #GitLab #CICD #CloudComputing #DevOpsJourney #LearningInPublic
i wanna copy and paste in aws community builder in one shot
Day 5: Docker → Amazon ECR → Amazon EKS As part of my AWS DevOps Community Builders learning journey, Day 5 focused on understanding how a containerized application moves from source code to a running application on Amazon EKS.
The main focus was:
Docker → Amazon ECR → Amazon EKS
This is one of the fundamental workflows for deploying modern cloud-native applications.
What I Learned Docker and containers
Dockerfiles
Docker images vs containers
Building Docker images
Image tagging
Amazon ECR
Pushing images to ECR
EKS pulling images from ECR
Kubernetes Deployments
Kubernetes Services
ECR authentication
Rolling updates
Liveness and readiness probes
GitLab CI/CD integration
- What is Docker? Docker allows us to package an application together with its dependencies into a container image.
The basic workflow is:
Application Code ↓ Dockerfile ↓ Docker Build ↓ Docker Image ↓ Docker Container Example:
docker build -t myapp:1.0 . docker run -p 8080:8080 myapp:1.0 Docker helps create a consistent environment across development, testing, and production.
- Docker Image vs Container Docker Image: A packaged template containing the application and its dependencies.
Container: A running instance of that image.
Docker Image | +---- Container 1 | +---- Container 2 | +---- Container 3 This becomes important when Kubernetes manages multiple replicas of an application.
- What is Amazon ECR? Amazon Elastic Container Registry (Amazon ECR) is a managed AWS container registry.
Instead of keeping Docker images only on a developer's machine, we can push them to ECR.
Developer ↓ Docker Build ↓ Docker Image ↓ Amazon ECR ECR becomes the container image repository that Amazon EKS can pull images from.
- Docker → Amazon ECR Build the image:
docker build -t myapp:1.0 . Tag the image:
docker tag myapp:1.0 <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 Authenticate with ECR:
aws ecr get-login-password --region| docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr..amazonaws.com Push the image:
docker push <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 Now the image is available in Amazon ECR.
- ECR → Amazon EKS Kubernetes can use the ECR image in a Deployment:
apiVersion: apps/v1 kind: Deployment metadata: name: myapp spec: replicas: 3 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp image: <ACCOUNT_ID>.dkr.ecr..amazonaws.com/myapp:1.0 ports: - containerPort: 8080 The flow:
Amazon ECR ↓ EKS Node ↓ Container Image ↓ Pod ↓ Application 6. Kubernetes Deployment Deploy the application:
kubectl apply -f deployment.yaml Check the Pods:
kubectl get pods Example:
NAME READY STATUS myapp-7d9f8c6b7d-abc12 1/1 Running myapp-7d9f8c6b7d-def34 1/1 Running myapp-7d9f8c6b7d-ghi56 1/1 Running Now we have three application replicas running in EKS.
- Kubernetes Service Pods are dynamic, so we use a Kubernetes Service to provide a stable endpoint.
apiVersion: v1 kind: Service metadata: name: myapp-service spec: selector: app: myapp ports: - port: 80 targetPort: 8080 type: ClusterIP The architecture:
Application ↓ Kubernetes Service ↓ +------+------+------+ | | | | Pod Pod Pod The Service provides stable networking while Pods can be created, removed, or replaced.
- Rolling Updates Kubernetes Deployments support controlled application updates.
Suppose version 1.0 is running:
Pod 1 → v1.0 Pod 2 → v1.0 Pod 3 → v1.0 When version 2.0 is released, Kubernetes can gradually replace the old Pods:
Pod 1 → v2.0 Pod 2 → v1.0 Pod 3 → v1.0
↓
Pod 1 → v2.0 Pod 2 → v2.0 Pod 3 → v1.0
↓
Pod 1 → v2.0 Pod 2 → v2.0 Pod 3 → v2.0 This provides controlled application updates.
- Health Checks Kubernetes provides health probes to determine whether applications are healthy and ready.
Liveness Probe Checks whether the container is running correctly.
Readiness Probe Checks whether the application is ready to receive traffic.
Example:
livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 10
readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 5 periodSeconds: 5 These checks become especially important for production workloads.
- GitLab CI/CD Integration Now the previous days start connecting together.
Developer ↓ GitLab ↓ GitLab CI/CD ↓ GitLab Runner ↓ Docker Build ↓ Security Scan ↓ Amazon ECR ↓ Amazon EKS ↓ Kubernetes Deployment ↓ Pods ↓ Service ↓ Application A developer can push code and trigger an automated process that builds the Docker image, pushes it to ECR, and deploys it to EKS.
Complete Architecture Developer | git push ↓ GitLab ↓ GitLab CI/CD ↓ GitLab Runner ↓ Docker Build ↓ Docker Image ↓ Amazon ECR ↓ Amazon EKS ↓ Kubernetes ↓ Deployment ↓ +---------+---------+ | | | Pod Pod Pod | | | +---------+---------+ ↓ Service ↓ Application The Big Picture Each technology has a specific responsibility:
Docker packages the application.
Amazon ECR stores the container image.
Amazon EKS runs and orchestrates the containers.
Kubernetes Deployment manages application replicas and updates.
Kubernetes Service provides stable networking to Pods.
GitLab CI/CD automates the delivery process.
Key Takeaway The complete workflow can be summarized as:
CODE → BUILD → CONTAINERIZE → SCAN → PUSH → DEPLOY → RUN
Or more specifically:
GitLab → Docker → Amazon ECR → Amazon EKS → Kubernetes Pods → Service → Application
The goal of CI/CD isn't simply to make deployment faster.
It is to make deployment:
Repeatable. Consistent. Automated. Reliable.
Connecting Day 4 and Day 5 Day 3 Terraform ↓ AWS Infrastructure ↓ Day 4 IAM + OIDC ↓ Secure CI/CD Authentication ↓ Day 5 Docker ↓ Amazon ECR ↓ Amazon EKS Each day builds on the previous one.
What's Next? For Day 6, I'll focus on:
Kubernetes Networking in Amazon EKS
Topics will include:
ClusterIP
NodePort
LoadBalancer
Ingress
AWS Load Balancer Controller
ALB
NLB
Kubernetes DNS
EKS VPC networking
End-to-end traffic flow
The journey continues:
Learn → Build → Secure → Automate → Deploy → Improve
#AWS #AWSCommunityBuilders #DevOps #Docker #AmazonECR #AmazonEKS #Kubernetes #GitLab #CICD #CloudComputing #DevOpsJourney #LearningInPublic
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article