Skip to content

gauravchile/EKSWebAppDeployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EKSWebAppDeployment

EKS Kubernetes Helm Docker AWS Autoscaler HPA License Platform

Production-ready GitHub repository scaffold to deploy a Docker Hub-hosted web application to Amazon EKS using:

  • Managed nodegroups (eksctl / AWS CLI)
  • AWS Load Balancer Controller (ALB ingress)
  • Cluster Autoscaler (IRSA)
  • Kustomize overlays for environment management
  • Horizontal Pod Autoscaler (HPA)

This repository intentionally avoids Terraform — cluster/node provisioning uses eksctl & aws CLI.


🚀 Complete Deployment Steps

A full end-to-end workflow to deploy your EKS cluster and web application.


✅ 1. Install prerequisites

make prereqs

This installs:

  • AWS CLI
  • kubectl
  • eksctl
  • Helm
  • jq, unzip, ca-certificates

✅ 2. Create the EKS Cluster

Cluster config file:

templates/cluster-config.yaml

Create cluster:

make cluster

⏳ Takes 15–25 minutes.

Verify:

aws eks describe-cluster --name EKSWEBDEPLOY --region ap-south-1

Look for: "status": "ACTIVE".


✅ 3. Update kubeconfig

make update-kubeconfig CLUSTER=EKSWEBDEPLOY REGION=ap-south-1
kubectl get nodes

You should see your managed nodegroup nodes.


✅ 4. Install AWS Load Balancer Controller (ALB)

Follow docs:

docs/alb-controller-install.md

This includes:

  • OIDC association
  • IAM policy creation
  • IRSA service account
  • Helm installation

Verify:

kubectl -n kube-system get deployment aws-load-balancer-controller

✅ 5. Install Cluster Autoscaler

./scripts/install_cluster_autoscaler.sh EKSWEBDEPLOY ap-south-1

Check:

kubectl -n kube-system get deployment cluster-autoscaler

✅ 6. Create Docker Pull Secret (Private Image Only)

make create-secret DOCKER_USER=myuser DOCKER_PASS=mypass [email protected]

✅ 7. Deploy the Web Application

Staging:

make deploy OVERLAY=manifests/overlays/staging

Production:

make deploy OVERLAY=manifests/overlays/prod

Check pods:

kubectl get pods -n webapp

✅ 8. Get the ALB URL

kubectl -n webapp get ingress

Copy the ALB DNS name into your browser.


🧹 9. Cleanup

Delete deployed app:

make destroy OVERLAY=manifests/overlays/staging

Delete entire EKS cluster:

eksctl delete cluster --name EKSWEBDEPLOY --region ap-south-1

📁 Project Structure

EKSWebAppDeployment/
├── Makefile                     # Automation: deploy, destroy, prereqs, kubeconfig, secret, etc.
├── README.md                    # Full documentation & setup guide
│
├── diagrams/
│   └── architecture.mmd         # Mermaid architecture diagram for EKS deployment
│
├── docs/                        # Additional project docs
│   ├── EKS.PNG                  # EKS architecture image
│   ├── alb-controller-install.md# Step-by-step ALB controller installation
│   └── best-practices.md        # Production best practices for EKS workloads
│
├── manifests/                   # Kubernetes manifests (Kustomize structure)
│   ├── base/                    # Base YAML (Deployment, Service, HPA, Ingress, Namespace)
│   └── overlays/                # Environment overlays
│       ├── prod/                # Production overrides
│       └── staging/             # Staging overrides
│
├── mywebapp/                    # Sample Node.js application deployed on EKS
│   ├── Dockerfile
│   ├── package.json
│   └── server.js
│
├── scripts/                     # Fully automated helper scripts
│   ├── prerequisites.sh         # Install AWS CLI, kubectl, eksctl, Helm, jq
│   ├── deploy.sh                # Deploy via Kustomize + Makefile
│   ├── destroy.sh               # Cleanup app resources
│   ├── create-image-pull-secret.sh # Private image pull secret generator
│   ├── create_nodegroup.sh      # Extra nodegroup creation
│   └── install_cluster_autoscaler.sh # Autoscaler installation with IRSA
│
└── templates/
    ├── cluster-config.yaml      # eksctl config: VPC, nodegroups, cluster settings
    └── nodegroup-config.yaml    # Optional separate nodegroup template


🏁 Done!

Your Amazon EKS cluster with ALB, Autoscaler, and Kustomize-based deployments is fully ready. Additional enhancements available:

  • HTTPS with ACM
  • ExternalDNS (automatic Route53 DNS management)
  • Spot + On-Demand mixed nodegroups
  • GitHub Actions CI/CD

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published