|
1 |
| -# node-ci-cd-k8s-monitoring |
| 1 | +# 🚀 Kubernetes Monitoring Stack with Node.js, Prometheus, Grafana, and GitHub Actions |
| 2 | + |
| 3 | +This project demonstrates a complete monitoring-enabled deployment pipeline for a containerized Node.js application using Kubernetes, Prometheus, and Grafana. CI/CD is fully automated with GitHub Actions, and deployments are tested locally using Minikube. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## ✅ Project Highlights |
| 8 | + |
| 9 | +- 🟢 **Node.js Application**: Lightweight backend service written in Node.js, exposing basic endpoints for monitoring. |
| 10 | +- 🐳 **Dockerized**: Fully containerized using Docker with a production-ready `Dockerfile`. |
| 11 | +- ☸️ **Kubernetes Native**: Application and observability stack deployed via Kubernetes manifests, including Deployments, Services, and Persistent Volumes. |
| 12 | +- 📈 **Prometheus Integration**: Configured to scrape metrics from the application with a custom `prometheus.yml`. |
| 13 | +- 📊 **Grafana Dashboards**: Set up to visualize key application and cluster metrics with persistent storage. |
| 14 | +- 🤖 **CI/CD with GitHub Actions**: Automated pipeline builds and pushes Docker images to Docker Hub on every commit to `main`. |
| 15 | +- 🧪 **Minikube Deployment**: Manual deployment workflow using Minikube for local development and testing. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## ⚙️ Technologies Used |
| 20 | + |
| 21 | +- **Node.js**, **Express** |
| 22 | +- **Docker**, **Docker Hub** |
| 23 | +- **Kubernetes**, **Minikube** |
| 24 | +- **Prometheus**, **Grafana** |
| 25 | +- **GitHub Actions (CI/CD)** |
| 26 | +- **YAML**, **Shell** |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## 🧪 Commands Used |
| 31 | + |
| 32 | +Deploy the application and observability stack locally using Minikube: |
| 33 | + |
| 34 | +```bash |
| 35 | +# Apply all Kubernetes manifests |
| 36 | +kubectl apply -f k8s/ |
| 37 | + |
| 38 | +# Create namespaces for Prometheus and Grafana |
| 39 | +kubectl create namespace prometheus |
| 40 | +kubectl create namespace grafana |
| 41 | + |
| 42 | +# Expose services via Minikube |
| 43 | +minikube service grafana |
| 44 | +minikube service prometheus-service -n prometheus |
| 45 | +minikube service node-service |
0 commit comments