An enterprise-grade, cloud-native microservice deployment built on AWS EKS, managed via Infrastructure as Code (Terraform), and reconciled continuously with a GitOps pipeline (Argo CD & GitHub Actions).
[ Developer ]
│
│ 1. git push origin main
▼
┌────────────────────────────────────────────────────────┐
│ GitHub Repository │
│ ├── .github/workflows/docker-build.yml ─────────────┐ │
│ ├── k8s/ (Deployment & Service Manifests) │ │
│ └── terraform/ (AWS Infrastructure) │ │
└──────────────────────────────────────────────────────┬─┘
│ 2. Triggers CI Build
▼
┌─────────────────────┐
│ GitHub Actions │
│ (Docker Build/Push) │
└──────────┬──────────┘
│
│ 3. Push Image
▼
┌─────────────────────┐
│ GitHub Container │
│ Registry (GHCR) │
└──────────┬──────────┘
│
┌───────────────────────── AWS Cloud ──────────────────┼─────────────────────────┐
│ │ │
│ ┌─────────────────── VPC (ecommerce-gitops-vpc) ───┼─────────────────────┐ │
│ │ │ │ │
│ │ ┌──────────────── Argo CD ─────────────────┐ │ 5. Pull Image │ │
│ │ │ - Reconciles state from Git (k8s/) │ │ (via Secret) │ │
│ │ │ - Auto-syncs to EKS Cluster │ │ │ │
│ │ └──────────────────────┬───────────────────┘ │ │ │
│ │ │ 4. Apply Manifests │ │ │
│ │ ▼ ▼ │ │
│ │ ┌────────────────────────────────────────────────────────────────┐ │ │
│ │ │ AWS EKS Cluster (ecommerce-gitops-cluster) │ │ │
│ │ │ Managed Node Group: t3.small │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────── k8s Namespace: default ─────────────────┐ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ [ Service ] (ClusterIP: 80 ➔ TargetPort: 8080) │ │ │ │
│ │ │ │ ▲ │ │ │ │
│ │ │ │ │ Routing │ │ │ │
│ │ │ │ [ Deployment: ecommerce-backend ] │ │ │ │
│ │ │ │ └─ Pod: Node.js Alpine (Port 8080) │ │ │ │
│ │ │ │ └── Modern HTML/CSS Storefront UI │ │ │ │
│ │ │ └────────────────────────────────────────────────────────┘ │ │ │
│ │ └────────────────────────────────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────────────┘
▲
│ kubectl port-forward
│
[ Local Browser ]
http://localhost:3000
| Domain | Technology | Purpose |
|---|---|---|
| Cloud Provider | AWS | Hosting VPC, subnets, NAT Gateways, IAM, and managed compute |
| Infrastructure as Code | Terraform | Automated provisioning of VPC and EKS infrastructure |
| Container Orchestration | AWS EKS (Kubernetes 1.34) | Container scheduling, self-healing, networking, and secret handling |
| GitOps Engine | Argo CD | Declarative continuous delivery and state synchronization from Git |
| CI / Automation | GitHub Actions | Automated image building and pushing to container registry |
| Artifact Registry | GitHub Container Registry (GHCR) | Secure private container registry for application packages |
| Container Runtime | Docker (node:20-alpine) |
Lightweight container runtime and packaging |
| Application Layer | Node.js | Microservice backend serving a responsive storefront dashboard |
- Declarative GitOps Delivery: All cluster state resides in Git (
k8s/). Argo CD automatically tracks and resolves configuration drift. - Automated Image Lifecycle: Pushes to
maintrigger GitHub Actions to build and push container images to GHCR. - Network Isolation: Custom AWS VPC configured with dedicated public/private subnets and managed NAT Gateways.
- Dynamic Frontend: Responsive storefront interface with real-time health indicator badges and an inventory catalog.
- Native Secret Management: Registry credentials injected at runtime using Kubernetes
imagePullSecrets.
.
├── .github/
│ └── workflows/
│ └── docker-build.yml # GitHub Actions CI workflow
├── k8s/
│ ├── deployment.yaml # Deployment spec with imagePullSecrets
│ └── service.yaml # ClusterIP service definition (Port 80 -> 8080)
├── terraform/
│ ├── main.tf # AWS Provider & VPC module
│ └── eks.tf # EKS cluster & node group definition
├── Dockerfile # Optimized container build
├── package.json # Dependencies and scripts
├── server.js # Microservice app code
└── README.md # Documentation
- AWS CLI configured via
aws configure - Terraform CLI (>= 1.5.0)
kubectl- Argo CD CLI
- Docker
cd terraform
terraform init
terraform apply -auto-approveaws eks update-kubeconfig --region us-east-1 --name ecommerce-gitops-cluster
kubectl get nodeskubectl create secret docker-registry ghcr-secret \
--namespace=default \
--docker-server=ghcr.io \
--docker-username=<YOUR_GITHUB_USERNAME> \
--docker-password=<YOUR_GITHUB_PAT># Install Argo CD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Create and sync application
argocd app create ecommerce-platform \
--repo https://github.com/<YOUR_GITHUB_USERNAME>/<YOUR_REPOSITORY_NAME>.git \
--path k8s \
--dest-server [https://kubernetes.default.svc](https://kubernetes.default.svc) \
--dest-namespace default
argocd app sync ecommerce-platformVerify the pods are running:
kubectl get pods -l app=ecommerce-backendPort-forward traffic locally:
kubectl port-forward svc/ecommerce-backend-svc 3000:80Open http://localhost:3000 in your browser.
To avoid ongoing AWS compute charges:
cd terraform
terraform destroy -auto-approve- ImagePullBackOff Resolution: Handled GHCR private package access by creating an EKS-native
docker-registrysecret mapped to pod specifications. - Port Mapping Alignment: Exposed container port (
8080) matched with Kubernetes ServicetargetPort: 8080to route external traffic properly (port: 80). - Deployment Rollout Invalidation: Used
kubectl rollout restart deployment ecommerce-backendto bypass local node image caching when iterating quickly.