How dolev225/docker-k8s-depploy-myapp works
This repository pairs a Flask sample application that generates and exposes Prometheus metrics with Docker and Helm deployment assets. The user-facing flow is to run the app, view its counter and metadata page or scrape /metrics, then deploy the container locally or through Helm. The README also documents a Jenkins pipeline, but its implementation and the Docker and chart templates were not sampled, so those deployment relationships are shown only where documented.
Main entry points: myapp.py Flask server · Chart.yaml Helm chart · Dockerfile Container image · service.yaml Kubernetes service
Components 14
Flask application
- Flask server
myapp.py - Counters and app info
myapp.py
Metrics and observability
- Metrics endpoint
myapp.py - Prometheus registry
myapp.py - Metric collectors
myapp.py - Traffic simulator
myapp.py
Container packaging
- Container image
Dockerfile
Helm deployment
- Helm chart
chart/Chart.yaml - Chart values
chart/values.yaml - Kubernetes workload
chart/templates/deployment.yaml - Kubernetes service
chart/templates/service.yaml - Ingress routing
chart/templates/ingress.yaml - Jenkins pipeline
Jenkinsfile
Other components
- Browser or scraper
Connections 15
- Browser or scraper → Flask server: requests
myapp.py - Flask server → Counters and app info: routes `/`
myapp.py - Flask server → Metrics endpoint: routes `/metrics`
myapp.py - Counters and app info → Prometheus registry: reads counters
myapp.py - Metrics endpoint → Prometheus registry: scrapes metrics
myapp.py - Metric collectors → Prometheus registry: registers metrics
myapp.py - Traffic simulator → Prometheus registry: updates metrics
myapp.py - Browser or scraper → Container image: builds and runs
README.md - Container image → Flask server: runs app
README.md - Browser or scraper → Helm chart: installs chart
README.md - Helm chart → Chart values: uses values
- Helm chart → Kubernetes workload: deploys image
README.md - Browser or scraper → Kubernetes service: port-forwards
README.md - Ingress routing → Kubernetes service: routes traffic
- Jenkins pipeline → Container image: builds image