Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes EKS Deployment

Author: Emmanuel Ubani — Cloud & DevOps Engineer

Kubernetes Terraform ArgoCD AWS Prometheus Grafana


📋 Overview

A production-grade Kubernetes deployment on AWS EKS provisioned with Terraform, managed with Argo CD GitOps, and monitored with Prometheus and Grafana.

Built as part of my hands-on Cloud & DevOps engineering portfolio.


🏗️ What This Project Builds

  • ✅ AWS VPC with public and private subnets across 3 AZs
  • ✅ AWS EKS cluster with managed node groups
  • ✅ KMS encryption for Kubernetes secrets
  • ✅ Auto-scaling from 1 to 10 nodes
  • ✅ Argo CD GitOps for automated deployments
  • ✅ Horizontal Pod Autoscaler
  • ✅ Pod Disruption Budget for high availability
  • ✅ Prometheus monitoring with custom alerts
  • ✅ Grafana dashboards for visualization
  • ✅ Zero-downtime rolling deployments
  • ✅ Resource quotas and limit ranges
  • ✅ Non-root container security context

🏛️ Architecture

                    ┌─────────────────────────┐
                    │       AWS EKS            │
                    │   (3 Availability Zones) │
                    └───────────┬─────────────┘
                                │
          ┌─────────────────────┼─────────────────────┐
          │                     │                     │
┌─────────▼──────┐   ┌─────────▼──────┐   ┌─────────▼──────┐
│   AZ-1         │   │   AZ-2         │   │   AZ-3         │
│ Public Subnet  │   │ Public Subnet  │   │ Public Subnet  │
│ Private Subnet │   │ Private Subnet │   │ Private Subnet │
└────────────────┘   └────────────────┘   └────────────────┘
          │                     │                     │
          └─────────────────────┼─────────────────────┘
                                │
                    ┌───────────▼─────────────┐
                    │     Node Group           │
                    │  (min:1 max:10 nodes)    │
                    └───────────┬─────────────┘
                                │
          ┌─────────────────────┼─────────────────────┐
          │                     │                     │
┌─────────▼──────┐   ┌─────────▼──────┐   ┌─────────▼──────┐
│  Production    │   │   Staging      │   │  Monitoring    │
│  Namespace     │   │   Namespace    │   │  Namespace     │
│                │   │                │   │                │
│ - App Pods     │   │ - App Pods     │   │ - Prometheus   │
│ - HPA          │   │                │   │ - Grafana      │
│ - PDB          │   │                │   │                │
└────────────────┘   └────────────────┘   └────────────────┘

🛠️ Technologies Used

Tool Purpose
Terraform Infrastructure as Code
AWS EKS Managed Kubernetes
AWS VPC Network infrastructure
Argo CD GitOps deployment
Prometheus Metrics collection
Grafana Visualization
KMS Secrets encryption
HPA Auto-scaling

📁 Project Structure

kubernetes-eks-deployment/
├── terraform/
│   ├── modules/
│   │   ├── eks/
│   │   │   ├── main.tf
│   │   │   ├── variables.tf
│   │   │   └── outputs.tf
│   │   └── vpc/
│   │       ├── main.tf
│   │       ├── variables.tf
│   │       └── outputs.tf
│   └── environments/
│       ├── dev/
│       └── prod/
├── kubernetes/
│   ├── base/
│   │   ├── deployment.yaml
│   │   ├── service.yaml
│   │   └── namespace.yaml
│   └── overlays/
│       ├── dev/
│       └── prod/
├── argocd/
│   └── application.yaml
├── monitoring/
│   ├── prometheus.yaml
│   └── grafana.yaml
└── README.md

🚀 How to Deploy

Prerequisites

  • AWS Account with EKS permissions
  • Terraform v1.0 or higher
  • kubectl installed
  • Helm installed
  • Argo CD CLI installed

Steps

1. Clone the repository

git clone https://github.com/Eaglewings966/kubernetes-eks-deployment.git
cd kubernetes-eks-deployment

2. Provision infrastructure

cd terraform/environments/dev
terraform init
terraform plan
terraform apply

3. Configure kubectl

aws eks update-kubeconfig \
  --region us-east-1 \
  --name emmanuel-eks-cluster

4. Install Argo CD

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

5. Apply Argo CD application

kubectl apply -f argocd/application.yaml

6. Install monitoring stack

kubectl apply -f monitoring/prometheus.yaml
kubectl apply -f monitoring/grafana.yaml

🔒 Security Features

  • KMS encryption for Kubernetes secrets
  • Non-root container security context
  • Read-only root filesystem
  • All capabilities dropped
  • Private subnets for worker nodes
  • Security groups for cluster access
  • Resource quotas and limit ranges
  • Pod disruption budgets

📊 Monitoring & Alerts

Alert Condition Severity
High CPU Usage CPU > 80% for 5 mins Warning
High Memory Usage Memory > 80% for 5 mins Warning
Pod Crash Looping Restarts > 1 in 15 mins Critical
Replicas Mismatch Available != Desired Critical

🔗 Connect With Me

Emmanuel Ubani — Cloud & DevOps Engineer


"Orchestrating containers at scale, one pod at a time." ☁️🚀

About

Production-grade Kubernetes deployment on AWS EKS with Terraform, Argo CD, GitOps, monitoring and auto-scaling

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages