# saikiranpi/mastering-kubernetes architecture

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

- Interactive diagram: https://gitdiagram.com/saikiranpi/mastering-kubernetes
- Repository: https://github.com/saikiranpi/mastering-kubernetes

## Overview

##### Project’s Main Focus and Components
- Each “Day” directory highlights a specific Kubernetes concept: cluster deployment (kubeadm, kOPS), orchestration (deployments, pods), networking (services, ingress, network policies), storage (PV/PVC, storage class), security (RBAC, secrets, configmaps), and more advanced integrations (Istio service mesh, Prometheus/Grafana, AWS EKS/Jenkins integration, MetricsServer, etc.).
- In addition, the “Rancher K3S” folder indicates additional guidance on lightweight Kubernetes clusters via Rancher’s distribution.

##### Break Down the Architecture into Clear Components
a. Core Cluster Components:
– Control Plane: Include the Kubernetes API Server, Scheduler, Controller Manager, etc.
– Worker Nodes: Represent the nodes which run PODs and include Resource Quotas, Sidecar containers, etc.
b. Deployment & Management:
– Deployment configurations (YAML files in many directories) indicating the desired state.
– Tools for cluster provisioning (kops, kubeadm, Rancher K3S).
– Advanced Scheduling modules demonstrating node selectors, affinity/anti-affinity, and taints.
c. Networking and Access:
– Service configurations, Ingress configurations, Network Policies.
– Istio Service Mesh components (Ingress Gateway, Virtual Services, auxiliary tools like Kiali and Jaeger).
d. Storage and Persistence:
– Persistent Volume (PV), Persistent Volume Claims (PVC) setups, dynamic provisioning and storage classes.
e. Monitoring, Logging, and Metrics:
– Integration of Prometheus, Grafana, and the EFK stack (Elasticsearch, Fluentd, Kibana).
– Metrics Server and autoscaling concepts (VPA, HPA, and Karpenter support).
f. CI/CD and Integration:
– AWS EKS-Jenkins configuration files along with kustomize overlays, demonstrating a continuous integration pipeline.
g. Security & Config Management:
– RBAC, Secrets, and ConfigMaps configurations.

##### Relationships and Data Flows
– Show how deployment YAML files define pods that communicate with services, which in turn interact with ingress controllers.
– Represent the control flow within the Kubernetes control plane from API Server → Scheduler → Worker Nodes.
– Indicate CI/CD pipelines (Jenkins) triggering deployments and updates across the cluster.
– Demonstrate monitoring data flows from cluster components (pods/nodes) to Prometheus and then dashboards like Grafana.

##### Architectural Patterns and Design Principles
- Clearly demarcate the separation of concerns: operational concerns (deployment, networking, storage, security) are modularized by “Day” folders.
- Common Kubernetes patterns such as declarative configuration via YAML, desired state management, and microservices architecture when combined with service meshes.
- Stress extensibility points (e.g., how additional configurations for RBAC or network policies can be added).

##### Final Assembly
- Every module from cluster provisioning (Day 00, Day 01, Day 17, Rancher K3S) to advanced topics (Service Mesh, Monitoring, Metrics, CI/CD) is represented.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        K8Intro["Kubernetes Introduction & Architecture"]:::infra
        subgraph "Cluster Provisioning"
            KOPS["KOPS Deployment"]:::infra
            Kubeadm["kubeadm Kubernetes Cluster"]:::infra
            Rancher["Rancher K3S Cluster"]:::infra
        end
    end

    %% Orchestration Layer
    subgraph "Orchestration Layer"
        Pods["Pods & ReplicaSets"]:::orchestration
        Deploy["Deployments"]:::orchestration
        Health["Health & Probes"]:::orchestration
        AdvancedWorkload["Advanced Workloads"]:::orchestration
    end

    %% Networking & Access Layer
    subgraph "Networking & Access Layer"
        Services["Services"]:::network
        Ingress["Ingress & TLS"]:::network
        NetPolicy["Network Policies"]:::network
    end

    %% Security & Configuration
    subgraph "Security & Configuration"
        RBAC["RBAC & Kubeconfig"]:::security
        Secrets["Secrets & ConfigMaps"]:::security
    end

    %% Storage & Persistence
    subgraph "Storage & Persistence"
        Storage["Persistent Storage"]:::storage
    end

    %% Advanced Scheduling
    subgraph "Advanced Scheduling"
        Scheduling["Node Selectors,Affinity,Taints"]:::scheduling
    end

    %% Service Mesh
    subgraph "Service Mesh"
        Istio["Istio Service Mesh"]:::mesh
    end

    %% Monitoring & Logging
    subgraph "Monitoring & Logging"
        Monitoring["Monitoring & Logging"]:::monitoring
        Scaling["Metrics Server & Autoscaling"]:::monitoring
    end

    %% CI/CD Integration
    subgraph "CI/CD Integration"
        CICD["AWS EKS & Jenkins Integration"]:::cicd
    end

    %% Connections from Infrastructure Layer to Orchestration
    K8Intro -->|"defines"| KOPS
    K8Intro -->|"defines"| Kubeadm
    K8Intro -->|"defines"| Rancher

    KOPS -->|"configures"| Pods
    Kubeadm -->|"configures"| Pods
    Rancher -->|"configures"| Pods

    %% Orchestration interactions
    Pods -->|"runs"| Deploy
    Deploy -->|"monitored by"| Health
    AdvancedWorkload -->|"extends"| Pods

    %% Networking interactions
    Deploy -->|"exposes"| Services
    Services -->|"routes to"| Ingress
    Deploy -->|"regulated by"| NetPolicy

    %% Security interactions
    Deploy -->|"secured by"| RBAC
    Deploy -->|"uses"| Secrets

    %% Storage interactions
    Pods -->|"mounts"| Storage

    %% Scheduling interactions
    Pods -->|"assigned via"| Scheduling

    %% Service Mesh interactions
    Ingress -->|"integrates with"| Istio
    Deploy -->|"observed by"| Istio

    %% Monitoring interactions
    Pods -->|"sends metrics"| Monitoring
    Deploy -->|"alerts"| Monitoring
    Monitoring -->|"influences"| Scaling

    %% CI/CD integration
    CICD -->|"triggers"| Deploy

    %% Click Events
    click K8Intro "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 00 Kubernetes Intro-Architecture/README.md"
    click KOPS "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 01 KOPS-Deployment/Kops-Commands.yml"
    click Kubeadm "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 17 kubeadm-kubernetes-cluster/README.md"
    click Rancher "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Rancher K3S/cluster.yml"
    click Pods "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 02 PODs-ReplicaSets/README.md"
    click Deploy "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 03 Deployments/README.md"
    click Services "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 04 Services/Service.yml"
    click Ingress "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 05 IngressController-TLS-RegistrySecret-Probes/Ingress.yml"
    click Health "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 06 Health_Probes/README.md"
    click AdvancedWorkload "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 07 Sidecar-ResourceQuotas-Jobs-CronJobs/deployment.yaml"
    click RBAC "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 08 RBAC-Kubeconfig_Merge/clusterrole.yml"
    click Secrets "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 09 Secrets-ESO-ConfigMaps/README.md"
    click Storage "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 10 Storage-PV-PVC-DynamicProvisioning/7storageclass.yml"
    click NetPolicy "https://github.com/saikiranpi/mastering-kubernetes/tree/Master/Day 11 NetworkPolicies/"
    click Scheduling "https://github.com/saikiranpi/mastering-kubernetes/tree/Master/Day 12 AdvanceScheduling/"
    click Istio "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 13 Istio-ServiceMesh/1-istio-ingressgateway.yml"
    click Monitoring "https://github.com/saikiranpi/mastering-kubernetes/blob/Master/Day 14 Prometheus-Grafana-EFK/elasticsearch.yml"
    click CICD "https://github.com/saikiranpi/mastering-kubernetes/tree/Master/Day 15 AWS_EKS_Jenkins_Integration/"
    click Scaling "https://github.com/saikiranpi/mastering-kubernetes/tree/Master/Day 16 MetricsServer_VPA_HPA_Karpenter/"

    %% Styles
    classDef infra fill:#ffcccc,stroke:#990000,stroke-width:2px;
    classDef orchestration fill:#ccffcc,stroke:#009900,stroke-width:2px;
    classDef network fill:#ccccff,stroke:#000099,stroke-width:2px;
    classDef security fill:#ffffcc,stroke:#999900,stroke-width:2px;
    classDef storage fill:#ffccff,stroke:#990099,stroke-width:2px;
    classDef scheduling fill:#cce6ff,stroke:#3399ff,stroke-width:2px;
    classDef mesh fill:#e6ccff,stroke:#6600cc,stroke-width:2px;
    classDef monitoring fill:#d9d9d9,stroke:#666666,stroke-width:2px;
    classDef cicd fill:#f2d9e6,stroke:#cc3366,stroke-width:2px;
```
