Docker Containers Management - Overview
Scope:
- Intro,
- Amazon ECR (Elastic Container Registry) – Container Image Storage
- ECR Workflow Command,
- Tag & push a Docker image to ECR,
- Amazon ECS (Elastic Container Service) – AWS-native Orchestration,
- AWS Fargate – Serverless Compute Engine,
- Amazon EKS (Elastic Kubernetes Service) – Kubernetes on AWS,
- Comparison Table,
- Best Use Cases by Service
- Typical Workflow for (ECS + Fargate + ECR)
Intro:
- Here's twtech Overview of how Docker containers are managed on AWS using ECS, EKS, Fargate, and ECR.
Docker
Containers stored on AWS
1.
Amazon ECR (Elastic Container Registry) – Container Image Storage
- What it is:
A fully managed Docker container registry that stores container images.
- Use case: twtech pushes Docker images to ECR, then ECS/EKS pulls from it to run
containers.
- Key Features:
- Secure, private repository
- Integrated with IAM for access control
- Supports vulnerability scanning
Workflow:
# bash
# Tag and
push a Docker image to ECR
docker
tag twtechapp:latest accountID.dkr.ecr.us-east-2.amazonaws.com/twtechapp:latest
aws ecr
get-login-password | docker login --username AWS --password-stdin ...
docker
push accountID.dkr.ecr.us-east-2.amazonaws.com/twtechapp:latest
2.
Amazon ECS (Elastic Container Service) – AWS-native Orchestration
- What it is:
A container orchestration service that runs Docker containers using a
simple configuration.
- Launch Types:
- Fargate
(serverless)
- EC2
(twtech manages EC2 instances)
- Use case:
Easy-to-use solution for deploying, scaling, and managing containers.
ECS Concepts:
- Task Definition:
JSON blueprint describing container(s)
- Task:
A running instance of a Task Definition
- Service:
Maintains the desired number of tasks
- Cluster:
A logical grouping of resources
3.
AWS Fargate – Serverless Compute Engine
- What it is:
A serverless compute engine for containers that works with ECS and EKS.
- Use case:
Run containers without provisioning or managing servers.
- Benefits:
- Pay-per-use
- No EC2 instance management
- Scales automatically
Best For:
- Short-lived jobs
- Microservices
- When twtech wants to focus only on containers, not
infrastructure
4.
Amazon EKS (Elastic Kubernetes Service) – Kubernetes on AWS
- What it is:
Managed Kubernetes service to run containerized applications.
- Use case:
If is already already using Kubernetes or want more flexibility and community
tools.
- Architecture:
- Control Plane managed by AWS
- Worker nodes (self-managed EC2 or Fargate)
EKS Concepts:
- Pods:
Smallest deployable unit (can have 1+ containers)
- Deployments:
Define how to manage pods
- Node Groups:
EC2 instances that run pods
Comparison Table
|
Feature |
ECS
(EC2) |
ECS
(Fargate) |
EKS
(EC2) |
EKS
(Fargate) |
|
Infra Mgmt. |
twtech manages EC2 |
Fully managed |
twtech manages EC2 |
Fully managed |
|
Complexity. |
Low |
Very low |
Medium-high |
Medium |
|
Flexibility. |
AWS-specific |
AWS-specific |
Very flexible |
Very flexible |
|
Cost Control. |
More control |
Pay-per-use |
More control |
Pay-per-use |
|
Learning Curve. |
Low |
Very low |
High |
Medium-high |
Best Use
Cases by Service
|
Scenario |
Best
AWS Service |
|
Simple web app with low
maintenance. |
ECS + Fargate |
|
Large-scale microservices
architecture. |
EKS (Kubernetes) |
|
Full control over VMs. |
ECS with EC2 |
|
CI/CD pipeline storing Docker
images. |
ECR |
|
Kubernetes expertise/team. |
EKS |
twtech-Typical Workflow for (ECS + Fargate + ECR)
- Build Docker image
- Push to Amazon ECR
- Define ECS Task Definition
- Create ECS Service with Fargate launch type
- Monitor via CloudWatch and ECS Console.
No comments:
Post a Comment