# moralg/despliegues_de_microservicios_en_k8s_con_helm architecture

> Architecture diagram of the GitHub repository moralg/despliegues_de_microservicios_en_k8s_con_helm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moralg/despliegues_de_microservicios_en_k8s_con_helm
- Repository: https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm

## Overview

##### Project type and purpose
- This is a hands-on tutorial/repository for deploying two microservices to Kubernetes using Helm v3.
- It contains two example charts:
- appCRUD: an Express.js CRUD service backed by MongoDB
- appLaravel: a Laravel PHP application backed by MySQL
- The README explains Helm concepts (charts, templating, versioning, repos) and shows how to package, install, upgrade, rollback, and publish.

##### File structure
- Top-level:
- Proyecto.md / README.md – course project documentation
- Presentación.odp – course presentation
- appCRUD/ – Helm chart for the Node/Mongo microservice
– Chart.yaml, values.yaml, templates/*.yaml, embedded MongoDB chart (mongodb-2.0.5.tgz)
- appLaravel/ – Helm chart for the Laravel/MySQL microservice
– README, values.yaml, secrets.yaml
- image/ – supporting images
- Each chart directory follows the standard Helm layout (Chart.yaml, values.yaml, templates).

##### README for additional insights
- Technologies: Docker, Kubernetes, Helm
- Goals: create charts from scratch, perform upgrades & rollbacks, host a public chart repo
- Two main “use cases” / microservices to deploy

##### Key reminders
- Every Helm chart artifact: Chart.yaml, templates, values, and the packaging step
- Both microservices side by side to highlight microservice architecture
- Feedback loop: upgrades and rollbacks via Helm
- Don’t overthink: break the system into developer tooling, chart repository, Kubernetes cluster, microservices, and data stores

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Developer Tooling"
        HelmCLI["Helm CLI"]:::tool
        DockerCLI["Docker CLI"]:::tool
    end

    subgraph "Project Documentation"
        DocsREAD["README.md"]:::doc
        DocsProj["Proyecto.md"]:::doc
        DocsPres["Presentación.odp"]:::doc
        DocsImg["image/"]:::doc
    end

    HelmCLI -->|"uses"| DockerCLI
    DockerCLI -->|"build images"| DockerRegistry["Docker Registry"]:::registry

    subgraph "Chart Repository"
        subgraph "appCRUD Chart"
            A_C_ChartYaml["Chart.yaml"]:::chart
            A_C_Values["values.yaml"]:::chart
            A_C_Deploy["templates/deployment.yaml"]:::chart
            A_C_Service["templates/service.yaml"]:::chart
            A_C_NOTES["templates/NOTES.txt"]:::chart
            A_C_Helpers["templates/_helpers.tpl.txt"]:::chart
            A_C_MongoChart["charts/mongodb-2.0.5.tgz"]:::chart
        end
        subgraph "appLaravel Chart"
            A_L_README["README.md"]:::chart
            A_L_Values["values.yaml"]:::chart
            A_L_Secrets["secrets.yaml"]:::chart
        end
    end

    HelmCLI -->|"helm package"| A_C_ChartYaml
    HelmCLI -->|"helm package"| A_L_README
    HelmCLI -->|"helm push/pull"| ChartRepository(("Chart Repository")):::repo

    DockerRegistry -->|"hosts images"| KubernetesCluster

    subgraph "Kubernetes Cluster"
        APIServer["API Server"]:::control
        Scheduler["Scheduler"]:::control
        subgraph "appCRUD Namespace"
            CRUDDeploy["appCRUD Deployment"]:::service
            CRUDService["appCRUD Service"]:::service
            MongoDBDS["MongoDB StatefulSet"]:::db
            MongoService["MongoDB Service"]:::db
        end
        subgraph "appLaravel Namespace"
            LaravelDeploy["Laravel Deployment"]:::service
            LaravelService["Laravel Service"]:::service
            MySQLDS["MySQL StatefulSet"]:::db
            MySQLService["MySQL Service"]:::db
        end
    end

    HelmCLI -->|"helm install/upgrade"| APIServer
    APIServer --> Scheduler
    Scheduler --> CRUDDeploy
    Scheduler --> MongoDBDS
    Scheduler --> LaravelDeploy
    Scheduler --> MySQLDS

    CRUDDeploy -->|"connects to"| MongoService
    LaravelDeploy -->|"connects to"| MySQLService

    CRUDService --> CRUDDeploy
    MongoService --> MongoDBDS
    LaravelService --> LaravelDeploy
    MySQLService --> MySQLDS

    ExternalClient["External Client"]:::external
    ExternalClient -->|"HTTP request"| CRUDService
    ExternalClient -->|"HTTP request"| LaravelService

    click A_C_ChartYaml "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/Chart.yaml"
    click A_C_Values "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/values.yaml"
    click A_C_Deploy "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/templates/deployment.yaml"
    click A_C_Service "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/templates/service.yaml"
    click A_C_NOTES "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/templates/NOTES.txt"
    click A_C_Helpers "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/templates/_helpers.tpl.txt"
    click A_C_MongoChart "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appCRUD/charts/mongodb-2.0.5.tgz"

    click A_L_README "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appLaravel/README.md"
    click A_L_Values "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appLaravel/values.yaml"
    click A_L_Secrets "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/appLaravel/secrets.yaml"

    click DocsREAD "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/README.md"
    click DocsProj "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/Proyecto.md"
    click DocsPres "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/blob/master/Presentación.odp"
    click DocsImg "https://github.com/moralg/despliegues_de_microservicios_en_k8s_con_helm/tree/master/image/"

    classDef tool fill:#ADD8E6,stroke:#000
    classDef doc fill:#E6E6FA,stroke:#000
    classDef registry fill:#87CEFA,stroke:#000
    classDef repo fill:#87CEFA,stroke:#000
    classDef chart fill:#B0E0E6,stroke:#000
    classDef control fill:#D3D3D3,stroke:#000
    classDef service fill:#90EE90,stroke:#000
    classDef db fill:#FFA500,stroke:#000
    classDef external fill:#FFB6C1,stroke:#000
```
