graph TB
User["Utilisateur / Navigateur"]
subgraph Minikube["Cluster Minikube"]
subgraph HelmChart["Helm Chart — myapp-chart"]
SVC["Service\n(NodePort :5000)"]
CM["ConfigMap\nAPP_MESSAGE"]
SA["ServiceAccount"]
HPA["HorizontalPodAutoscaler\n(optionnel)"]
ING["Ingress\n(optionnel)"]
subgraph DEP["Deployment (2 réplicas)"]
POD1["Pod 1\nFlask app :5000"]
POD2["Pod 2\nFlask app :5000"]
end
end
end
subgraph Build["Build local"]
SRC["app.py"]
DF["Dockerfile\n(python:3.11-slim)"]
IMG["Image Docker\nmyapp:1.0.0"]
SRC --> DF --> IMG
end
IMG -->|minikube image build| DEP
CM -->|envFrom| POD1
CM -->|envFrom| POD2
SA --> DEP
HPA -->|scale| DEP
SVC --> POD1
SVC --> POD2
ING -->|optionnel| SVC
User -->|minikube service| SVC
Loading
Install minikube
Install helm
Clone the repo:
git clone --depth 1 --branch main https://github.com/Todiq/kubernetes_training.git
Build the app:
minikube start && cd kubernetes_training && minikube image build -t myapp:1.0.0 .
Deploy the app:
helm install myapp ./myapp-chart
Access the app from the browser
minikube service myapp-myapp-chart
Dynamically update the displayed text:
helm upgrade myapp ./myapp-chart --set appConfig.message=' Hello there!'
Rollback:
Uninstall the app:
Kill the minikube service myapp-myapp-chart process, then run
helm uninstall myapp && minikube stop