# jobopak/proyectointegradoasir architecture

> Architecture diagram of the GitHub repository jobopak/proyectointegradoasir, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jobopak/proyectointegradoasir
- Repository: https://github.com/jobopak/proyectointegradoasir

## Overview

1. **What this repository is**
   - This is an infrastructure-as-code and operations repository, not a product codebase.
   - Its purpose is to describe, provision, and operate a **high-availability Kubernetes cluster on Proxmox VE** with supporting services for networking, ingress, persistent storage, and application deployment.

2. **Top-level architecture boundary**
   - The physical foundation is a **Proxmox VE host**.
   - On top of that, the repo models several **Ubuntu Server VMs**: one Kubernetes control plane, two workers, an Ansible automation node, and an NFS storage server.
   - A separate client machine is used only for validation and access tests.

3. **Repository split by concern**
   - `docs/` contains the step-by-step project narrative and the design rationale.
   - `ansible/` contains automation for provisioning and node setup.
   - `kubernetes/` contains cluster manifests for networking, ingress, storage, and sample workloads.
   - `scripts/` is present but currently only a placeholder.

4. **Provisioning and configuration automation**
   - The Ansible area is small but important: `inventory/hosts.ini` defines target hosts, while the playbooks cover prerequisites and Kubernetes node installation.
   - This automation boundary suggests the repo is meant to standardize node setup rather than hand-configure each VM.

5. **Cluster bootstrap layer**
   - Kubernetes cluster initialization is represented in the manifests and docs rather than as an imperative installer script.
   - The repo assumes a **kubeadm-style** bootstrap workflow on Ubuntu with **containerd** as runtime and **Flannel** as the CNI network plugin.
   - `kubernetes/manifests/kube-flannel.yml` is the cluster pod networking layer.

6. **Internal pod networking**
   - Flannel provides the overlay network that allows pods on different worker nodes to communicate.
   - The docs indicate the repo treats kernel/network prerequisites as first-class architecture constraints, especially around `br_netfilter`, IPv6 handling, and kubelet node IP selection.

7. **External service exposure**
   - The cluster exposes services externally through **MetalLB** plus an **NGINX Ingress Controller**.
   - MetalLB is the bare-metal load-balancer layer; its manifests live under `kubernetes/manifests/metallb/`.
   - NGINX ingress is deployed separately under `kubernetes/manifests/ingress/`, and becomes the primary HTTP/HTTPS entrypoint for applications.

8. **Persistent storage subsystem**
   - Persistent data is handled by a dedicated **NFS server** and Kubernetes storage resources.
   - The storage manifests include an NFS-backed `StorageClass`, RBAC, a storage provisioner/deployment, and a test PVC.
   - This creates the storage boundary between ephemeral application pods and durable volumes on external infrastructure.

9. **Application workload layer**
   - The repo includes two application examples: a simple `web-demo` workload and a more complete **WordPress + MySQL** stack.
   - The WordPress app is split into namespace, secrets, database, storage, workload, and ingress manifests, which shows the intended separation of concerns:
     - namespace isolation
     - secret management
     - stateful database
     - persistent storage
     - ingress-based exposure

10. **Operational data flow**
   - The main runtime flow is: **Proxmox VM provisioning → Ansible node setup → Kubernetes cluster bootstrap → Flannel pod networking → MetalLB external IP assignment → NGINX ingress routing → application pods → NFS-backed persistence**.
   - This is the key path to capture in an architecture diagram because it shows how traffic and state move through the system.

11. **Operational caveats baked into the design**
   - The README documents important environment constraints that affect architecture: IPv6 is disabled, `kubelet` is pinned to the correct node IP, containerd uses `systemd` cgroups, and MetalLB requires `strictARP`.
   - These are not just troubleshooting notes; they are part of the cluster’s operational contract.

12. **Documentation as a first-class deliverable**
   - The `docs/` folder is structured as a phased implementation guide from Proxmox install through monitoring.
   - That makes the repository suitable both as a deployment reference and as a project report artifact, with PDFs included for formal documentation.

13. **Security and credential boundary**
   - `kubernetes/token_k8s.txt` indicates the repo also stores cluster join/bootstrap material.
   - In an architecture diagram, this should be treated as a sensitive bootstrap artifact, separate from normal workload manifests.

14. **What is intentionally out of scope**
   - There is no application source tree here beyond manifests and deployment descriptors.
   - Monitoring with Prometheus/Grafana is described in the docs as optional, but there is no visible dedicated monitoring stack in the file tree yet.

Main entry points: [`docs/Documento-de-Análisis-de-Requisitos-y-Viabilidad.md`](https://github.com/jobopak/proyectointegradoasir/blob/main/docs/Documento-de-Análisis-de-Requisitos-y-Viabilidad.md) (Project docs), [`kubernetes/manifests/metallb/metallb-native.yaml`](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/metallb/metallb-native.yaml) (MetalLB), [`kubernetes/manifests/ingress/deploy.yaml`](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/ingress/deploy.yaml) (NGINX ingress), [`ansible/inventory/hosts.ini`](https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/inventory/hosts.ini) (Inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Foundation"]
  node_proxmox[("Proxmox VE<br/>hypervisor")]
  node_ubuntu_vms["Ubuntu VMs<br/>vm layer"]
  node_control_plane["Control plane<br/>k8s vm"]
  node_workers["Workers<br/>k8s vm set"]
end

subgraph group_automation["Automation"]
  node_automation_node["Ansible node<br/>automation vm"]
  node_ansible_inventory["Inventory<br/>[hosts.ini]"]
  node_ansible_prereq["Prereqs<br/>ansible playbook<br/>[pre-requisitos.yml]"]
  node_ansible_k8snode["Node setup<br/>ansible playbook"]
end

subgraph group_cluster["Cluster"]
  node_flannel["Flannel<br/>cni overlay<br/>[kube-flannel.yml]"]
  node_metallb["MetalLB<br/>bare-metal lb"]
  node_metallb_cfg["LB config"]
  node_ingress["NGINX ingress<br/>ingress controller<br/>[deploy.yaml]"]
end

subgraph group_storage["Storage"]
  node_storage_sc["NFS storage<br/>storage provisioner<br/>[deployment.yaml]"]
  node_nfs_server[("NFS server<br/>storage vm")]
end

subgraph group_apps["Workloads"]
  node_wordpress["WordPress<br/>app stack<br/>[wordpress.yml]"]
  node_web_demo["Web demo<br/>sample app<br/>[web-demo.yaml]"]
end

subgraph group_docs["Docs"]
  node_docs_plan["Project docs<br/>documentation"]
  node_docs_proxmox["Proxmox setup<br/>guide"]
  node_docs_cluster["Cluster bootstrap<br/>guide"]
end

subgraph group_ops["Ops"]
  node_token["Join token<br/>bootstrap secret<br/>[token_k8s.txt]"]
end

node_proxmox -->|"hosts"| node_ubuntu_vms
node_ubuntu_vms -->|"includes"| node_control_plane
node_ubuntu_vms -->|"includes"| node_workers
node_ubuntu_vms -->|"includes"| node_automation_node
node_ubuntu_vms -->|"includes"| node_nfs_server
node_automation_node -->|"uses"| node_ansible_inventory
node_ansible_inventory -->|"drives"| node_ansible_prereq
node_ansible_inventory -->|"drives"| node_ansible_k8snode
node_ansible_prereq -->|"prepares"| node_control_plane
node_ansible_prereq -->|"prepares"| node_workers
node_ansible_k8snode -->|"configures"| node_control_plane
node_ansible_k8snode -->|"configures"| node_workers
node_docs_plan -->|"covers"| node_docs_proxmox
node_docs_plan -->|"covers"| node_docs_cluster
node_control_plane -->|"boots with"| node_flannel
node_flannel -->|"connects"| node_workers
node_control_plane -->|"exposes via"| node_metallb
node_metallb -->|"configured by"| node_metallb_cfg
node_metallb -->|"feeds"| node_ingress
node_ingress -->|"routes to"| node_wordpress
node_ingress -->|"routes to"| node_web_demo
node_storage_sc -->|"backs onto"| node_nfs_server
node_wordpress -->|"persists on"| node_storage_sc
node_wordpress -.->|"depends on"| node_token
node_docs_plan -->|"describes"| node_storage_sc
node_docs_plan -->|"describes"| node_metallb
node_docs_plan -->|"describes"| node_ingress

click node_ansible_inventory "https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/inventory/hosts.ini"
click node_ansible_prereq "https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/playbooks/pre-requisitos.yml"
click node_ansible_k8snode "https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/playbooks/install-k8s-node.yml"
click node_docs_plan "https://github.com/jobopak/proyectointegradoasir/blob/main/docs/Documento-de-Análisis-de-Requisitos-y-Viabilidad.md"
click node_docs_proxmox "https://github.com/jobopak/proyectointegradoasir/blob/main/docs/01.Instalación-Proxmox.md"
click node_docs_cluster "https://github.com/jobopak/proyectointegradoasir/blob/main/docs/03.Inicialización-del-Cluster-Kubernetes.md"
click node_flannel "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/kube-flannel.yml"
click node_metallb "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/metallb/metallb-native.yaml"
click node_metallb_cfg "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/metallb/metallb-config.yaml"
click node_ingress "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/ingress/deploy.yaml"
click node_storage_sc "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/storage/deployment.yaml"
click node_wordpress "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/apps/wordpress/wordpress.yml"
click node_web_demo "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/apps/web-demo.yaml"
click node_token "https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/token_k8s.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_proxmox,node_ubuntu_vms,node_control_plane,node_workers,node_token toneBlue
class node_automation_node,node_ansible_inventory,node_ansible_prereq,node_ansible_k8snode toneAmber
class node_flannel,node_metallb,node_metallb_cfg,node_ingress toneMint
class node_storage_sc,node_nfs_server toneRose
class node_wordpress,node_web_demo toneIndigo
class node_docs_plan,node_docs_proxmox,node_docs_cluster toneTeal
```

## Components

### Foundation

Physical host and virtual machine layer.

- **Proxmox VE**: hypervisor · Physical virtualization host for the lab environment.
- **Ubuntu VMs**: vm layer · Control plane, workers, automation node, and storage server running on Proxmox.
- **Control plane**: k8s vm · Ubuntu Kubernetes master node created on Proxmox.
- **Workers**: k8s vm set · Ubuntu worker nodes that run application pods.

### Automation

Ansible-based host provisioning and node setup.

- **Ansible node**: automation vm · Dedicated host that runs provisioning and setup playbooks.
- [Inventory](https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/inventory/hosts.ini): ansible inventory · Target host definitions used by automation. · `ansible/inventory/hosts.ini`
- [Prereqs](https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/playbooks/pre-requisitos.yml): ansible playbook · Installs host prerequisites and cluster dependencies. · `ansible/playbooks/pre-requisitos.yml`
- [Node setup](https://github.com/jobopak/proyectointegradoasir/blob/main/ansible/playbooks/install-k8s-node.yml): ansible playbook · Configures Kubernetes nodes and bootstrap settings. · `ansible/playbooks/install-k8s-node.yml`

### Cluster

Kubernetes bootstrap and shared platform services.

- [Flannel](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/kube-flannel.yml): cni overlay · Pod networking layer for cross-node connectivity. · `kubernetes/manifests/kube-flannel.yml`
- [MetalLB](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/metallb/metallb-native.yaml): bare-metal lb · External IP assignment for services on bare metal. · `kubernetes/manifests/metallb/metallb-native.yaml`
- [LB config](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/metallb/metallb-config.yaml): config · Address pool and MetalLB operational settings. · `kubernetes/manifests/metallb/metallb-config.yaml`
- [NGINX ingress](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/ingress/deploy.yaml): ingress controller · HTTP and HTTPS entrypoint for application routing. · `kubernetes/manifests/ingress/deploy.yaml`

### Storage

Persistent storage boundary and NFS-backed provisioning.

- [NFS storage](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/storage/deployment.yaml): storage provisioner · NFS-backed dynamic provisioning and storage resources. · `kubernetes/manifests/storage/deployment.yaml`
- **NFS server**: storage vm · External server that holds durable shared volumes.

### Workloads

Example application manifests deployed on the cluster.

- [WordPress](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/apps/wordpress/wordpress.yml): app stack · Multi-manifest application with database, storage, and ingress. · `kubernetes/manifests/apps/wordpress/wordpress.yml`
- [Web demo](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/manifests/apps/web-demo.yaml): sample app · Minimal workload used for cluster validation. · `kubernetes/manifests/apps/web-demo.yaml`

### Docs

Project narrative, implementation phases, and report artifacts.

- [Project docs](https://github.com/jobopak/proyectointegradoasir/blob/main/docs/Documento-de-Análisis-de-Requisitos-y-Viabilidad.md): documentation · Phased implementation guide and project report material. · `docs/Documento-de-Análisis-de-Requisitos-y-Viabilidad.md`
- [Proxmox setup](https://github.com/jobopak/proyectointegradoasir/blob/main/docs/01.Instalación-Proxmox.md): guide · Proxmox installation and Ubuntu VM provisioning steps. · `docs/01.Instalación-Proxmox.md`
- [Cluster bootstrap](https://github.com/jobopak/proyectointegradoasir/blob/main/docs/03.Inicialización-del-Cluster-Kubernetes.md): guide · Kubernetes initialization and node join workflow. · `docs/03.Inicialización-del-Cluster-Kubernetes.md`

### Ops

Sensitive bootstrap material and operational artifacts.

- [Join token](https://github.com/jobopak/proyectointegradoasir/blob/main/kubernetes/token_k8s.txt): bootstrap secret · Sensitive cluster bootstrap artifact stored in the repository. · `kubernetes/token_k8s.txt`

## Connections

- Proxmox VE → Ubuntu VMs: hosts · Proxmox provides the virtual machine layer for the cluster lab.
- Ubuntu VMs → Control plane: includes · The VM layer includes the Kubernetes control-plane node.
- Ubuntu VMs → Workers: includes · The VM layer includes worker nodes.
- Ubuntu VMs → Ansible node: includes · The VM layer includes the automation host.
- Ubuntu VMs → NFS server: includes · The VM layer includes the external storage server.
- Ansible node → Inventory: uses · The automation host runs Ansible against the inventory.
- Inventory → Prereqs: drives · Inventory targets are used by the prerequisite playbook.
- Inventory → Node setup: drives · Inventory targets are used by the Kubernetes node playbook.
- Prereqs → Control plane: prepares · Prerequisites are applied to the control-plane host.
- Prereqs → Workers: prepares · Prerequisites are applied to worker hosts.
- Node setup → Control plane: configures · Node setup standardizes the control-plane configuration.
- Node setup → Workers: configures · Node setup standardizes the worker configuration.
- Project docs → Proxmox setup: covers · The documentation is structured as phased implementation guides.
- Project docs → Cluster bootstrap: covers · Cluster bootstrap is one of the documented phases.
- Control plane → Flannel: boots with · Kubernetes uses Flannel for pod networking.
- Flannel → Workers: connects · Overlay networking enables pod traffic across worker nodes.
- Control plane → MetalLB: exposes via · Services are assigned external IPs through MetalLB.
- MetalLB → LB config: configured by · MetalLB behavior is defined by its address-pool config.
- MetalLB → NGINX ingress: feeds · Ingress is exposed through bare-metal service IPs.
- NGINX ingress → WordPress: routes to · Ingress routes HTTP traffic to the WordPress stack.
- NGINX ingress → Web demo: routes to · Ingress can also expose the sample demo workload.
- NFS storage → NFS server: backs onto · Persistent volumes are provisioned from the NFS server.
- WordPress → NFS storage: persists on · WordPress uses persistent storage for stateful data.
- WordPress → Join token: depends on · Bootstrap material is a sensitive operational dependency.
- Project docs → NFS storage: describes · The documentation covers NFS-backed persistent storage.
- Project docs → MetalLB: describes · The documentation covers bare-metal service exposure.
- Project docs → NGINX ingress: describes · The documentation covers ingress controller deployment.
