# terraform-aws-modules/terraform-aws-eks architecture

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

- Interactive diagram: https://gitdiagram.com/terraform-aws-modules/terraform-aws-eks
- Repository: https://github.com/terraform-aws-modules/terraform-aws-eks

## Overview

##### Main Components Identification

a. Core EKS Components:
- EKS Control Plane
- Node Groups (Managed, Self-managed, and Fargate)
- OIDC Provider for IRSA
- KMS Encryption
- CloudWatch Logging

b. Networking Components:
- VPC Integration
- Security Groups
- Network Connectivity

c. Identity and Access Management:
- IAM Roles and Policies
- Access Entries
- Authentication Components

**┌─ AWS Cloud ──────────────────────────────────────────────┐**
- ┌─ VPC ─────────────────────────────────────────────┐   │

- ┌─ EKS Cluster ─────────────────────┐            │   │
- ┌─ Control Plane ─┐               │            │   │
- ┌─ Nodes ─┐  │            │   │
- API Server    │  │         │  │            │   │
- etcd          │  │ - MNG   │  │            │   │
- Controllers   │  │ - Self  │  │            │   │
- ┘  │ - Fargate│  │            │   │
- ┘  │            │   │
- ┘            │   │

- ┘   │

- ┌─ Supporting Services ───────────────────────────────┐ │
- KMS                                              │ │
- CloudWatch                                       │ │
- IAM                                             │ │
- ┘ │
- ┘

##### Connection Types

Different types of connections:

##### Implementation Details

- Module structure and relationships
- Resource creation flow
- Security group rules and access patterns
- IAM role relationships
- -on integration points

##### Documentation Integration

References to:
- AWS documentation
- Module documentation
- Configuration examples
- Upgrade guides

This system design should provide a clear understanding of:
- The module's architecture
- Security boundaries
- Network flow
- IAM relationships
- Scaling capabilities
- Integration points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph AWS["AWS Cloud"]
        subgraph VPC["VPC Environment"]
            subgraph EKS["EKS Cluster"]
                CP["Control Plane<br/>- API Server<br/>- etcd<br/>- Controllers"]
                
                subgraph Nodes["Node Types"]
                    MNG["Managed Node Groups"]:::node
                    SMMG["Self-managed Nodes"]:::node
                    FP["Fargate Profiles"]:::node
                    KRP["Karpenter"]:::node
                end
                
                subgraph Auth["Authentication"]
                    AWSAUTH["AWS Auth"]:::auth
                    OIDC["OIDC Provider"]:::auth
                end
                
                subgraph Bootstrap["Node Bootstrap"]
                    UD["User Data"]:::bootstrap
                    subgraph OSTemplates["OS Templates"]
                        AL["Amazon Linux 2023"]:::template
                        BR["Bottlerocket"]:::template
                        LX["Linux"]:::template
                        WIN["Windows"]:::template
                    end
                end
            end
            
            subgraph Network["Network Components"]
                SG["Security Groups"]
                NETCON["Network Connectivity"]:::network
            end
        end
        
        subgraph Support["Supporting Services"]
            KMS["KMS Encryption"]:::security
            CW["CloudWatch Logs"]:::monitoring
            IAM["IAM Roles & Policies"]:::security
        end
    end
    
    %% Relationships
    CP --> MNG
    CP --> SMMG
    CP --> FP
    CP --> KRP
    
    AWSAUTH --> Nodes
    OIDC --> Nodes
    
    UD --> OSTemplates
    OSTemplates --> Nodes
    
    Nodes --> Network
    CP --> Network
    
    IAM --> CP
    IAM --> Nodes
    KMS --> CP
    CW --> CP
    
    %% Styles
    classDef node fill:#1a73e8,color:#fff
    classDef auth fill:#f4b400,color:#000
    classDef bootstrap fill:#0f9d58,color:#fff
    classDef template fill:#4285f4,color:#fff
    classDef security fill:#db4437,color:#fff
    classDef monitoring fill:#4285f4,color:#fff
    classDef network fill:#0f9d58,color:#fff
    
    %% Click Events
    click MNG "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/eks-managed-node-group/"
    click SMMG "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/self-managed-node-group/"
    click FP "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/fargate-profile/"
    click KRP "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/karpenter/"
    click AWSAUTH "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/aws-auth/"
    click UD "https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/modules/_user_data/"
    click AL "https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/templates/al2023_user_data.tpl"
    click BR "https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/templates/bottlerocket_user_data.tpl"
    click LX "https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/templates/linux_user_data.tpl"
    click WIN "https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/templates/windows_user_data.tpl"
    click NETCON "https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/network_connectivity.md"
```
