This project demonstrates a production-style CI/CD pipeline using:
- Python (Flask) — application
- Docker — containerization
- Jenkins — CI (build and push)
- GitHub — source and configuration repositories
- Kubernetes — deployment platform
- ArgoCD — CD (GitOps)
The application is a Traffic Analyzer API that tracks incoming requests and exposes metrics.
Developer (Git Push)
↓
GitHub (App Repo)
↓
Jenkins (CI Pipeline)
↓
DockerHub (Image Registry)
↓
GitHub (K8s Repo)
↓
ArgoCD (GitOps CD)
↓
Kubernetes Cluster
↓
Running Application
traffic-analyzer/
├── app.py
├── requirements.txt
├── Dockerfile
├── Jenkinsfile
traffic-analyzer-k8s/
├── deployment.yml
├── service.yml
- Tracks total requests
- Tracks endpoint hits
- Tracks IP addresses
/— Health check/stats— JSON analytics/metrics— Prometheus-compatible metrics
docker build -t traffic-analyzer .
docker run -p 5000:5000 traffic-analyzer- Build Image
- Push Image to DockerHub
- Update Kubernetes Repository
git push → Jenkins builds image → pushes to DockerHub → updates K8s repo → ArgoCD deploys
| ID | Purpose |
|---|---|
| dockerhub-creds | Push Docker images |
| github-creds | Update Kubernetes repository |
- Deployment with 2 replicas
- Uses versioned Docker images
- Service exposed via NodePort
- Watches the
traffic-analyzer-k8srepository - Applies changes automatically
- Keeps the cluster in sync with Git
- Automatic sync enabled
- Prune enabled
- Self-heal enabled
- Developer pushes code
- Jenkins triggers (Poll SCM)
- Jenkins builds and pushes the Docker image
- Jenkins updates the Kubernetes repository
- ArgoCD detects changes
- ArgoCD syncs the deployment
- Kubernetes performs a rolling update
kubectl describe pod | grep Image:Expected:
yogramming/traffic-analyzer:<latest-tag>
kubectl get pods -w- Rolling updates (zero downtime)
- Old pods terminate after new pods are ready
- Jenkins uses Poll SCM (
H/2 * * * *) - Checks GitHub every ~2 minutes
| Issue | Cause | Fix |
|---|---|---|
| ImagePullBackOff | Image not pushed | Push image to DockerHub |
| Git push fails | Token permissions | Use PAT with write access |
| ArgoCD not deploying | Auto-sync disabled | Enable auto-sync |
| Jenkins not triggering | No trigger configured | Enable Poll SCM |
- Add Prometheus and Grafana dashboards
- Add Horizontal Pod Autoscaler (HPA)
- Add Ingress and domain routing
- Replace polling with GitHub webhooks
- Add staging and production environments
- Real-world CI/CD pipeline
- GitOps workflow
- Kubernetes deployment strategies
- Docker image lifecycle
- Debugging real-world DevOps issues
- CI (Jenkins) builds artifacts
- CD (ArgoCD) deploys from Git
- Git is the single source of truth
- Kubernetes ensures safe deployments
Built as a hands-on DevOps learning project focused on real-world workflows.
This project reflects how modern cloud-native systems are built and deployed in production environments.