👨💻 Author: Yash Sonawane
🔗 GitHub Repository: https://github.com/yashsonawane25/k8s-microservices-vote-system
📍 Pune, India
📌 Introduction
Modern applications are built using microservices and deployed using container orchestration platforms like Kubernetes. To gain deep hands-on experience with production-style DevOps workflows, I built and deployed a cloud-native voting system on an AWS EC2 instance using:
- Kubernetes (Kind)
- Docker
- Argo CD
- Prometheus
- Grafana
- Redis
- PostgreSQL
Instead of using managed Kubernetes services like EKS, I manually configured the cluster using Kind to understand Kubernetes internals, networking, service exposure, and Git-driven deployments.
This article explains the architecture, implementation, monitoring setup, and key learnings from this project.
🏗 System Architecture
🔎 Architecture Overview
The application follows a distributed microservices model:
🧩 Components
- Python Frontend – Allows users to vote between two options
- Redis – Temporarily stores incoming votes
- .NET Worker Service – Processes votes asynchronously
- PostgreSQL Database – Stores persistent vote data
- Node.js Result Service – Displays live voting results
🔁 Request Flow
- User submits vote via frontend
- Vote is stored in Redis
- Worker consumes vote and writes to PostgreSQL
- Result service reads from PostgreSQL and displays updated results
- Kubernetes manages scaling and availability
- Argo CD syncs application state from GitHub
This architecture simulates real-world distributed systems used in production environments.
☁️ Infrastructure Setup on AWS
Step 1 – Launch EC2 Instance
- Ubuntu-based EC2 instance
- Configured Security Groups
- Installed Docker
sudo apt update
sudo apt install docker.io -y
Step 2 – Install Kind & Create Kubernetes Cluster
Kind allows running Kubernetes clusters inside Docker containers.
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv kind /usr/local/bin/
kind create cluster
Verified cluster setup:
kubectl get nodes
🚀 Deploying Microservices to Kubernetes
Created Kubernetes manifests for:
- Deployments
- Services
- ConfigMaps
- Persistent Volumes
Applied configuration:
kubectl apply -f k8s/
Verified pod status:
kubectl get pods
🔄 Continuous Deployment using Argo CD
Installed Argo CD inside the cluster:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Connected the GitHub repository to Argo CD.
Enabled:
- Automated Sync
- Self-Healing
- Version-controlled deployments
Now every Git push updates the Kubernetes cluster automatically.
📊 Observability & Monitoring
Production systems require deep visibility into performance and health.
🔎 Prometheus Metrics
Prometheus collects:
- Pod metrics
- Node metrics
- CPU usage
- Memory utilization
- Service health
📈 Grafana Dashboards
Grafana provides real-time visualization for:
- Cluster health
- Resource consumption
- Performance monitoring
- Troubleshooting bottlenecks
🗄 Database & Persistence
PostgreSQL is configured with persistent volumes to ensure data durability even if pods restart.
This ensures:
- Data integrity
- Fault tolerance
- Reliable state management
🎯 Key DevOps Concepts Applied
✔ Kubernetes cluster provisioning from scratch
✔ Microservices architecture deployment
✔ Container orchestration
✔ Automated Git-based deployments
✔ Monitoring & observability
✔ Self-healing workloads
✔ Persistent storage management
🧠 Challenges Faced & Learnings
During this project, I encountered and resolved:
- Image pull issues
- Service exposure and NodePort configuration
- Container networking challenges
- Monitoring configuration tuning
- Kubernetes resource debugging
This hands-on debugging strengthened my real-world DevOps troubleshooting skills.
💼 Why This Project Matters
This project replicates a production-style cloud-native deployment pipeline without relying on managed Kubernetes services.
It demonstrates:
- Infrastructure setup on cloud VMs
- Container orchestration
- Automated application delivery
- Observability stack integration
- Scalable microservices design
🔗 Source Code
👉 https://github.com/yashsonawane25/k8s-microservices-vote-system
🚀 Open to Opportunities
I am actively seeking DevOps / Cloud Internship opportunities where I can apply Kubernetes, CI/CD, monitoring, and automation skills in production environments.
If you're hiring or collaborating, let's connect.






Top comments (1)
What was your reason for putting your db in a kubernetes cluster? After reading something like this i wouldn't choose a cluster deployment.