Skip to content

Todiq/kubernetes_training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architecture

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

Installation

  1. Install minikube

  2. Install helm

  3. Clone the repo:

git clone --depth 1 --branch main https://github.com/Todiq/kubernetes_training.git
  1. Build the app:
minikube start && cd kubernetes_training && minikube image build -t myapp:1.0.0 .
  1. Deploy the app:
helm install myapp ./myapp-chart
  1. Access the app from the browser
minikube service myapp-myapp-chart
  1. Dynamically update the displayed text:
helm upgrade myapp ./myapp-chart --set appConfig.message='Hello there!'
  1. Rollback:
helm rollback myapp
  1. Uninstall the app: Kill the minikube service myapp-myapp-chart process, then run
helm uninstall myapp && minikube stop

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors