# santos-pardos/k8s-eks architecture

> Architecture diagram of the GitHub repository santos-pardos/k8s-eks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/santos-pardos/k8s-eks
- Repository: https://github.com/santos-pardos/k8s-eks

## Overview

##### Main Components
a. AWS & EKS Infrastructure – show the AWS environment including the EKS cluster which includes the control plane provided by AWS and worker nodes where all the sample pods run.
b. Kubernetes Core Resources – illustrate key Kubernetes elements: deployments, services, replica sets, pods (including those with multi-container setups), statefulsets, daemonsets, configmaps, secrets, cronjobs, jobs, and RBAC roles.
c. Application Examples – note there are dedicated folders for specific applications (e.g., “Basic-EKS” for simple samples, “Deploy-User-Management-Microservice” for a microservice illustration, “EksGuestbook”, “HelloWorld”, etc.). These represent multiple demo applications, each with its own deployments and services.
d. Infrastructure Extensions – include modules such as ingress controllers (e.g., “Eks-Ingress-Nginx”), load balancers (ALB, NLB examples), persistent volumes (EBS, EFS, hostPath, NFS examples), and additional cloud integrations (e.g., ECR-ECS, IAM-RBAC).
e. Supporting Tools and CI/CD – list associated tools and utilities (Helm, Kustomize, Docker-Compose, VSC Server) as part of the toolchain that supports deployment and maintenance.

##### Relationships and Data Flows
d. Configuration management flows (configmaps, secrets) being injected into pods via environment variables or mounted volumes.
e. Inter-service communication where microservices interact (for example, in the “Deploy-User-Management-Microservice” folder, show both an API service and a backend database service for MySQL).

##### Architectural Patterns and Technologies
a. Separation of concerns: Different YAML files and folders represent different architectural patterns (stateless applications vs. stateful applications, short-lived batch jobs vs. long-running services).
b. Multi-layer deployment strategies: Illustrate blue/green strategies from the Eks-Blue-Green folder.
c. Infrastructure as Code: Note that YAML files are used as declarative configuration for Kubernetes objects.
d. External cloud integrations: Indicate AWS components such as ALB, EBS, EFS, and their relationship to the pods/services.
e. Toolchain and Versioning: Include the tools detailed in the README (e.g., Helm, eksctl, kustomize) as integral elements that manage the overall lifecycle of deployments.

##### Detailed and Modular Approach

- Management/control tools (kubectl, eksctl, Helm, kustomize) that interact with the Kubernetes API server.

## Diagram (Mermaid)

```mermaid
flowchart TD
    Developer["Developer Environment (kubectl, eksctl, Helm, kustomize)"]:::dev
    Developer -->|"deploys/configs"| AWS_EKS["AWS EKS Cluster"]:::aws

    subgraph "AWS EKS Cluster"
        direction TB
        subgraph "Control Plane"
            CP1["EKS CLI Config"]:::control
            CP2["Basic EKS Config"]:::control
        end
        subgraph "Worker Nodes"
            direction TB
            subgraph "Kubernetes Core Resources"
                direction TB
                K8s1["Deployments/Services/Pods"]:::core
                K8s2["ConfigMaps & Secrets"]:::core
                K8s3["ReplicaSets & DaemonSets"]:::core
                K8s4["Jobs & CronJobs"]:::core
                K8s5["RBAC"]:::core
                K8s6["StatefulSets"]:::core
            end
            subgraph "Application Examples"
                direction TB
                App1["Basic-EKS App Examples"]:::app
                subgraph "User Management Microservice"
                    direction TB
                    App2a["API Service"]:::app
                    App2b["MySQL Database"]:::app
                    App2a -->|"calls"| App2b
                end
                App3["EksGuestbook App"]:::app
                App4["HelloWorld App"]:::app
                App5["Stateless App"]:::app
                App6["Stateful App"]:::app
            end
            subgraph "Infrastructure Extensions"
                direction TB
                Infra1["Ingress Controller"]:::infra
                Infra2["Load Balancer (ALB/SSL)"]:::infra
                Infra3["Persistent Volumes (EFS)"]:::infra
                Infra4["Persistent Volumes (EBS)"]:::infra
                Infra5["Cloud Integration (ECR/ECS)"]:::infra
            end
        end
    end

    subgraph "Supporting Tools & CI/CD"
        direction TB
        CICD1["YAML Templates"]:::cicd
        CICD2["CI/CD (ArgoCD)"]:::cicd
    end

    Developer -->|"triggers"| CICD1
    Developer -->|"triggers"| CICD2
    CICD1 -->|"manages"| AWS_EKS
    CICD2 -->|"deploys"| AWS_EKS

    CP1 -->|"schedules"| K8s1
    CP2 -->|"schedules"| K8s1

    K8s1 -->|"hosts"| App1
    K8s1 -->|"hosts"| App2a
    K8s1 -->|"hosts"| App3
    K8s1 -->|"hosts"| App4
    K8s1 -->|"hosts"| App5
    K8s1 -->|"hosts"| App6

    classDef dev fill:#ccccff,stroke:#333,stroke-width:2px;
    classDef aws fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef control fill:#99ccff,stroke:#333,stroke-width:2px;
    classDef core fill:#aaffaa,stroke:#333,stroke-width:2px;
    classDef app fill:#ffff99,stroke:#333,stroke-width:2px;
    classDef infra fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef cicd fill:#e0bbff,stroke:#333,stroke-width:2px;

    %% Click Events for AWS & EKS Infrastructure
    click CP1 "https://github.com/santos-pardos/k8s-eks/blob/main/EkS-Cluster-Cli/cluster.yaml"
    click CP2 "https://github.com/santos-pardos/k8s-eks/blob/main/Basic-EKS/Cluster.yaml"

    %% Click Events for Kubernetes Core Resources
    click K8s1 "https://github.com/santos-pardos/k8s-eks/tree/main/Basic-EKS/"
    click K8s2 "https://github.com/santos-pardos/k8s-eks/tree/main/Configmaps-Secrets/"
    click K8s3 "https://github.com/santos-pardos/k8s-eks/tree/main/DaemontSet-ReplicaSet-Services/"
    click K8s4 "https://github.com/santos-pardos/k8s-eks/tree/main/Job-CronJob/"
    click K8s5 "https://github.com/santos-pardos/k8s-eks/tree/main/IAM-RBAC/"
    click K8s6 "https://github.com/santos-pardos/k8s-eks/tree/main/StatefulSet/"

    %% Click Events for Application Examples
    click App1 "https://github.com/santos-pardos/k8s-eks/tree/main/Basic-EKS/"
    click App2a "https://github.com/santos-pardos/k8s-eks/tree/main/Deploy-User-Management-Microservice/"
    click App3 "https://github.com/santos-pardos/k8s-eks/tree/main/EksGuestbook/"
    click App4 "https://github.com/santos-pardos/k8s-eks/tree/main/HelloWorld/"
    click App5 "https://github.com/santos-pardos/k8s-eks/tree/main/sample-stateless-app/"
    click App6 "https://github.com/santos-pardos/k8s-eks/tree/main/stateful-app/"

    %% Click Events for Infrastructure Extensions
    click Infra1 "https://github.com/santos-pardos/k8s-eks/tree/main/Eks-Ingress-Nginx/"
    click Infra2 "https://github.com/santos-pardos/k8s-eks/tree/main/EKS-ALB-SSL/"
    click Infra3 "https://github.com/santos-pardos/k8s-eks/tree/main/Lab/Lab17-Efs-K8s/"
    click Infra4 "https://github.com/santos-pardos/k8s-eks/tree/main/Lab/Lab18-Ebs-K8s/"
    click Infra5 "https://github.com/santos-pardos/k8s-eks/tree/main/ECR-ECS/"

    %% Click Events for Supporting Tools & CI/CD
    click CICD1 "https://github.com/santos-pardos/k8s-eks/tree/main/kubernetes-yaml-templates-master/"
    click CICD2 "https://github.com/santos-pardos/k8s-eks/tree/main/argoCD-101/"
```
