The Ops Dashboard is a modern, real-time monitoring solution built with Flask and deployed on Kubernetes. It provides system metrics, Kubernetes cluster status, and application health monitoring with a responsive UI.
- Frontend: HTML5, TailwindCSS, Chart.js, Moment.js
 - Backend: Python/Flask
 - Container: Docker
 - Orchestration: Kubernetes
 - CI/CD: GitHub Actions
 
- 
System Monitoring
- CPU Usage
 - Memory Usage
 - Storage Metrics
 - Real-time Updates
 
 - 
Kubernetes Integration
- Pod Status
 - Node Health
 - Deployment Status
 - Cluster Events
 
 - 
Application Health
- Response Time
 - Error Rate
 - System Uptime
 - Live Performance Charts
 
 
- Clone the repository
 
git clone https://github.com/srikxcipher/ops-dash.git
cd ops-dash- Install dependencies
 
pip install -r requirements.txt- Run locally
 
python -m app.mainAccess at http://localhost:5000/
- Pull the image
 
docker pull srikant25/ops-dashboard:latest- Build the image
 
docker build -t srikant25/ops-dashboard:latest .- Run container
 
docker run -p 5000:5000 srikant25/ops-dashboard:latest- Start Minikube
 
minikube start- Apply RBAC (Required for Kubernetes metrics)
 
kubectl apply -f k8s/rbac.yaml- Deploy application
 
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml- Verify deployment
 
kubectl get pods -l app=ops-dashboard
kubectl get svc ops-dashboard- Access the dashboard
 
minikube service ops-dashboard --url- Configuration needed to be done on your GitHub Repository, goto Settings -> Security -> Secrets and Variables -> Actions | Here store your secrets.
 
- 
Set up GitHub Secrets:
- DOCKER_USERNAME: Your Docker Hub username
 - DOCKER_PASSWORD: Your Docker Hub password/token
 
 - 
Pipeline automatically:
- Builds Docker image
 - Pushes to Docker Hub on main branch changes
 
 
- 
Frontend Components:
- Real-time metrics display
 - Interactive charts
 - Event logging
 - Health status indicators
 
 - 
Backend Routes:
- /metrics - System metrics
 - /health - Application health
 - /k8s/status - Kubernetes status
 - /events - System events
 
 - 
Kubernetes Resources:
- Deployment: 2 replicas for high availability
 - Service: NodePort for Minikube access
 - RBAC: Required permissions for metrics
 
 
- 
System Metrics:
- CPU utilization percentage
 - Memory usage tracking
 - Storage capacity monitoring
 - Performance trends
 
 - 
Kubernetes Monitoring:
- Pod status and health
 - Node conditions
 - Deployment status
 - Resource utilization
 
 - 
Application Metrics:
- Response time tracking
 - Error rate monitoring
 - System uptime
 - Performance graphs
 
 
- 
Container Best Practices:
- Multi-stage builds
 - Non-root user
 - Resource limits
 - Health checks
 
 - 
Kubernetes Best Practices:
- Readiness/Liveness probes
 - Resource quotas
 - RBAC security
 - High availability setup
 
 - 
Monitoring Best Practices:
- Real-time updates
 - Performance metrics
 - Error tracking
 - Event logging
 
 
- Container Issues:
 
# Check container logs
docker logs <container-id>
# Check container status
docker ps -a- Kubernetes Issues:
 
# Check pod logs
kubectl logs -l app=ops-dashboard
# Check pod status
kubectl describe pod -l app=ops-dashboard
# Check service
kubectl describe svc ops-dashboard- Application Issues:
- Check browser console for frontend errors
 - Verify API endpoints are responding
 - Check Flask logs in container
 - Verify metrics collection
 
 
- 
Documentation:
- Flask: https://flask.palletsprojects.com/
 - Kubernetes: https://kubernetes.io/docs/
 - Chart.js: https://www.chartjs.org/docs/
 - TailwindCSS: https://tailwindcss.com/docs
 
 - 
Tools:
- Docker: https://docs.docker.com/
 - Minikube: https://minikube.sigs.k8s.io/docs/
 - GitHub Actions: https://docs.github.com/en/actions
 
 
- 
Container Security:
- Non-root user
 - Minimal base image
 - Updated dependencies
 - Resource limitations
 
 - 
Kubernetes Security:
- RBAC implementation
 - Resource quotas
 - Network policies
 - Secure configurations
 
 - 
Application Security:
- Environment variables
 - Error handling
 - Input validation
 - Secure communications