# gearup2000/k8s architecture

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

- Interactive diagram: https://gitdiagram.com/gearup2000/k8s
- Repository: https://github.com/gearup2000/k8s

## Overview

##### Main Components
- “Local Cluster” (Minikube)
- “AWS Cluster via eksctl”
- “AWS Cluster using Terraform”
- Management Tools: Show components such as:
- kubectl for interacting with multiple clusters
- Kubernetes Dashboard
- Lens IDE for Kubernetes
- Application Components: Highlight the Kubernetes objects and demonstration examples:
- Pod creation and container launching
- Labels, annotations, and namespaces
- ReplicationControllers/ReplicaSets and Deployments (including application update strategies)
- Various Services (ClusterIP, ExternalName, NodePort, LoadBalancer, and Headless Services)
- Ingress configurations for exposing applications
- Health Probes (liveness, readiness, and startup probes)
- Docker Image Building: Separate out the examples showing Dockerfile usage (both for a general image and a Python-based image, including cases demonstrating unhealthy images).

##### Relationships and Interactions
- For management tools, show the interaction from a user’s machine using kubectl and how the Dashboard or Lens provides a graphical layer atop clusters.
- Within each cluster, illustrate how deployments manage Pods, how ReplicaSets ensure Pod stability, and how Services provide network access to Pods. Indicate the data flow, for example, from user requests hitting an Ingress resource that routes traffic to a Service and then to underlying Pods.
- A section on Docker image creation, showing that Docker builds produce container images that are later deployed in pods via Kubernetes YAML manifests.

##### Architectural Patterns & Design Principles
- Separation between control-plane (cluster management) and the worker nodes (where pods run).
- That this project demonstrates best practices (like update strategies and health probes) that are core to general Kubernetes infrastructure design.

##### Recommended Elements
– From user/tool → API Server.
– From API Server → Controllers/Deployments.
– From Services → Pods.
– From clients (or external networks) through Ingress → Services.
– Cluster infrastructure vs. management tools.
– Different types of Kubernetes objects (pods, deployments, services, probes).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global Node
    API["Kubernetes API Server"]:::api

    %% Cluster Provisioning Subgraph
    subgraph "Cluster Provisioning"
        LC["Local Cluster (Minikube)"]:::provisioning
        AWSEks["AWS Cluster (eksctl)"]:::provisioning
        AWSTer["AWS Cluster (Terraform)"]:::provisioning
    end

    %% Management Tools Subgraph
    subgraph "Management Tools"
        Kube["kubectl Client"]:::management
        K8sDash["Kubernetes Dashboard"]:::management
        LensIDE["Lens IDE"]:::management
    end

    %% Application Components Subgraph
    subgraph "Application Components"
        PodNode["Pod Creation & Container Launching"]:::application
        LabelsNode["Labels,Annotations,Namespaces"]:::application
        ReplicaNode["ReplicationControllers/ReplicaSets"]:::application
        DeployNode["Deployments & Update Strategies"]:::application
        ServiceClusterIP["Service: ClusterIP"]:::application
        ServiceOther["Service: ExternalName/NodePort/LoadBalancer/Headless"]:::application
        IngressNode["Ingress Configurations"]:::application
        ProbesNode["Health Probes (Liveness,Readiness,Startup)"]:::application
    end

    %% Docker Image Building Subgraph
    subgraph "Docker Image Building"
        DockerGen["Docker Image Building – General Image"]:::docker
        DockerPy["Docker Image Building – Python Image"]:::docker
        DockerUnhealthy["Docker Image Building – Unhealthy Image Example"]:::docker
    end

    %% Interactions between Clusters and API Server
    LC --> API
    AWSEks --> API
    AWSTer --> API

    %% Interactions from Management Tools to API Server
    Kube --> API
    K8sDash --> API
    LensIDE --> API

    %% API Server interacting with Application Components
    API --> DeployNode
    DeployNode --> ReplicaNode
    ReplicaNode --> PodNode
    API --> LabelsNode
    API --> IngressNode
    IngressNode --> ServiceClusterIP
    IngressNode --> ServiceOther
    ServiceClusterIP --> PodNode
    ServiceOther --> PodNode
    API --> ProbesNode
    ProbesNode --> PodNode

    %% Docker images deploying containers to Pods
    DockerGen --> PodNode
    DockerPy --> PodNode
    DockerUnhealthy --> PodNode

    %% Styles for Component Categories
    classDef provisioning fill:#d1e8ff,stroke:#2a7,stroke-width:2px;
    classDef management fill:#ffe4b3,stroke:#d67,stroke-width:2px;
    classDef application fill:#d1ffd6,stroke:#28a,stroke-width:2px;
    classDef docker fill:#ffd1d1,stroke:#a22,stroke-width:2px;
    classDef api fill:#fff2cc,stroke:#f1c40f,stroke-width:2px;

    %% Click Events for Component Mapping
    click LC "https://github.com/gearup2000/k8s/blob/main/Minikube/Installing Minikube and kubectl.md"
    click AWSEks "https://github.com/gearup2000/k8s/blob/main/2. Launching a Kubernetes Cluster on AWS using eksctl/Installing AWS CLI, eksctl etc.md"
    click AWSTer "https://github.com/gearup2000/k8s/blob/main/3. Launching a Kubernetes Cluster on AWS using Terraform/Launching a Kubernetes Cluster on AWS Using Terraform.md"
    click Kube "https://github.com/gearup2000/k8s/blob/main/4. How to use kubectl with multiple kubernetes clusters/How to use kubectl with multiple kubernetes clusters.md"
    click K8sDash "https://github.com/gearup2000/k8s/blob/main/5. How to Install Kubernetes Dashboard/How to Install Kubernetes Dashboard.md"
    click LensIDE "https://github.com/gearup2000/k8s/blob/main/9. Lens - IDE for Kubernetes/README.md"
    click PodNode "https://github.com/gearup2000/k8s/blob/main/7. Creating a Pod. Launching Containers in Kubernetes/kubernetes-pod.yaml"
    click LabelsNode "https://github.com/gearup2000/k8s/blob/main/8. Labels, Annotations, and Namespaces in Kubernetes/README.md"
    click ReplicaNode "https://github.com/gearup2000/k8s/blob/main/10. ReplicationController and ReplicaSet in Kubernetes/README.md"
    click DeployNode "https://github.com/gearup2000/k8s/blob/main/11. Deployment in Kubernetes. Application Update Strategies/README.md"
    click ServiceClusterIP "https://github.com/gearup2000/k8s/blob/main/12. Service in Kubernetes - Part 1. Type ClusterIP Endpoints/README.md"
    click ServiceOther "https://github.com/gearup2000/k8s/blob/main/13. Service in Kubernetes - Part 2. Types-ExternalName, NodePort and LoadBalancer. Headless Service/README.md"
    click IngressNode "https://github.com/gearup2000/k8s/blob/main/14. Ingress in Kubernetes. Creating ingress on Minikube/README.md"
    click ProbesNode "https://github.com/gearup2000/k8s/blob/main/15. Probes-Liveness, Readiness, StartupProbe and httpGet in Kubernetes/README.md"
    click DockerGen "https://github.com/gearup2000/k8s/tree/main/6. Build Docker image/Docker Image/Dockerfile"
    click DockerPy "https://github.com/gearup2000/k8s/tree/main/6. Build Docker image/Python Image/Dockerfile"
    click DockerUnhealthy "https://github.com/gearup2000/k8s/tree/main/6. Build Docker image/Python Image/Unhealthy Image/Dockerfile"
```
