# stacksimplify/aws-eks-kubernetes-masterclass architecture

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

- Interactive diagram: https://gitdiagram.com/stacksimplify/aws-eks-kubernetes-masterclass
- Repository: https://github.com/stacksimplify/aws-eks-kubernetes-masterclass

## Overview

##### Main System Components
- AWS Infrastructure Layer:
– AWS EKS Cluster: The heart of the project where all containerized applications run.
– AWS Compute Resources: Both EC2-based nodes and Fargate-managed workloads.
– AWS Storage Components: EBS (via the CSI driver), plus integration with RDS for MySQL.
– AWS Load Balancing: Inclusion of Classic Load Balancer (CLB), Network Load Balancer (NLB), and Application Load Balancer (ALB) (with variations like Ingress SSL, context-based routing, ExternalDNS, etc.).
– AWS Container Registry: ECR in addition to pulling images from Docker Hub.
– AWS Developer Tools: CodeCommit, CodeBuild, and CodePipeline.
– Monitoring and Tracing: CloudWatch (Container Insights) and AWS X-Ray.

- Kubernetes & Microservices Layer:
– Foundational Kubernetes components: Pods, ReplicaSets, Deployments, Services (NodePort, ClusterIP, ExternalName) and Ingress.
– Specialized modules for Kubernetes concepts: Secrets, ConfigMaps, Liveness/Readiness Probes, Init Containers, Namespaces (with Limit Ranges and Resource Quota), and Storage (storage classes, PVCs, PVs).
– Actual Application Deployments: Microservices (for user management and notification services) and sample Nginx apps.
– Autoscaling: Horizontal Pod Autoscaler (HPA), Vertical Pod Autoscaler (VPA), and Cluster Autoscaler.
– Advanced Deployment Strategies: Canary deployments and distributed tracing with AWS X-Ray.

- Docker/CI-CD Layer:
– Docker images and containerization fundamentals.
– Build and push process from local Docker builds to AWS ECR.
– DevOps inclusive module using AWS developer tools for continuous integration and delivery.

##### Relationships & Interactions
- How the AWS CLI/eksctl creates and manages the EKS cluster.
- Deployment flow within the EKS cluster – from container images (Docker/ECR) being deployed as pods (with appropriate Kubernetes manifests) to how services are exposed via load balancers (CLB, NLB, ALB).
- Storage components: link the Kubernetes persistent volume claims (both for EBS and RDS external names) with the actual underlying AWS storage.
- Monitoring and tracing elements that capture logs and metrics and forward them to CloudWatch and AWS X-Ray.

##### Important Architectural Patterns & Principles
- Separation of Concerns: Group modules by functionality – cluster provisioning, containerization, Kubernetes fundamentals, load balancing, stateful services, autoscaling, CI/CD, and monitoring.
- Cloud-Native Design: Emphasize the loosely-coupled microservices architecture, container orchestration, and usage of managed AWS services.

##### Technologies, Frameworks & Libraries Involved
- AWS Services (EKS, EBS, RDS, ALB/NLB/CLB, ECR, CodeCommit/CodeBuild/CodePipeline, CloudWatch, X-Ray)
- Kubernetes (deployments, services, ingress, autoscaling, persistent volume concepts)
- Docker for containerization
- CI/CD tooling around AWS Developer Tools

##### Provide Concrete Elements for the Principal Software Engineer
- Containers inside the cluster representing various microservices (e.g., Notification Microservice, User Management Microservice, Nginx Apps) with respective Kubernetes objects (Pods, Deployments).
- Various Load Balancer components (for CLB, NLB, ALB) attached to Services/Ingress routes.
- Monitoring and Logging components feeding into CloudWatch Container Insights and AWS X-Ray for distributed tracing.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "AWS Infrastructure Layer"
        nodeA["AWS EKS Cluster Provisioning"]:::aws
        nodeB["EC2 Node Groups"]:::aws
        nodeC["Fargate Profiles"]:::aws
        nodeD["Storage: EBS Storage"]:::aws
        nodeE["Storage: RDS MySQL"]:::aws
        subgraph "AWS Load Balancing"
            nodeF1["Load Balancing: CLB/NLB"]:::aws
            nodeF2["Load Balancing: ALB"]:::aws
            nodeF3["Load Balancing: Advanced NLB"]:::aws
        end
        nodeG["Container Registry: AWS ECR"]:::aws
        nodeH["CI/CD Pipeline (CodeCommit/CodeBuild/CodePipeline)"]:::cicd
        nodeI["Monitoring: CloudWatch Insights"]:::monitoring
        nodeJ["Tracing: AWS X-Ray"]:::monitoring
    end

    subgraph "Kubernetes & Microservices Layer"
        nodeK["Kubernetes Fundamentals"]:::k8s
        nodeL["Advanced Kubernetes Concepts"]:::k8s
        nodeM["Microservices Deployments"]:::k8s
        subgraph "Autoscaling"
            nodeN1["Horizontal Pod Autoscaler"]:::k8s
            nodeN2["Vertical Pod Autoscaler"]:::k8s
            nodeN3["Cluster Autoscaler"]:::k8s
        end
    end

    nodeA -->|"creates"| nodeB
    nodeA -->|"creates"| nodeC
    nodeH -->|"triggers"| nodeG
    nodeG -->|"deploys"| nodeM
    nodeK -->|"supports"| nodeM
    nodeL -->|"enhances"| nodeM
    nodeD -->|"attaches"| nodeL
    nodeE -->|"attaches"| nodeL
    nodeF1 -->|"routesTraffic"| nodeM
    nodeF2 -->|"routesTraffic"| nodeM
    nodeF3 -->|"routesTraffic"| nodeM
    nodeM -->|"scales"| nodeN1
    nodeM -->|"scales"| nodeN2
    nodeM -->|"scales"| nodeN3
    nodeM -->|"monitors"| nodeI
    nodeM -->|"traces"| nodeJ

    click nodeA "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/01-EKS-Create-Cluster-using-eksctl"
    click nodeB "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/01-EKS-Create-Cluster-using-eksctl"
    click nodeC "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/09-EKS-Workloads-on-Fargate"
    click nodeD "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/04-EKS-Storage-with-EBS-ElasticBlockStore"
    click nodeE "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/06-EKS-Storage-with-RDS-Database"
    click nodeF1 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/07-ELB-Classic-and-Network-LoadBalancers"
    click nodeF2 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/08-NEW-ELB-Application-LoadBalancers"
    click nodeF3 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/19-ELB-Network-LoadBalancers-with-LBC"
    click nodeG "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/10-ECR-Elastic-Container-Registry-and-EKS"
    click nodeH "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/11-DevOps-with-AWS-Developer-Tools"
    click nodeK "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/03-Kubernetes-Fundamentals"
    click nodeL "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/05-Kubernetes-Important-Concepts-for-Application-Deployments"
    click nodeM "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/12-Microservices-Deployment-on-EKS"
    click nodeN1 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/15-EKS-HPA-Horizontal-Pod-Autoscaler"
    click nodeN2 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/16-EKS-VPA-Vertical-Pod-Autoscaler"
    click nodeN3 "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/17-EKS-Autoscaling-Cluster-Autoscaler"
    click nodeI "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/18-EKS-Monitoring-using-CloudWatch-Container-Insights"
    click nodeJ "https://github.com/stacksimplify/aws-eks-kubernetes-masterclass/tree/master/13-Microservices-Distributed-Tracing-using-AWS-XRay-on-EKS"

    classDef aws fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef k8s fill:#ABEBC6,stroke:#229954,stroke-width:2px;
    classDef cicd fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef monitoring fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
