# soo9725/k8s-terraform architecture

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

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

## Overview

This repository describes layered Terraform infrastructure for an AWS-backed Kubernetes platform, plus Kubernetes manifests for a sample application. The documented workflow provisions foundational networking and storage, creates a cluster, adds platform services and ingress, then deploys applications and observability; a separate autoscaling layer supports Karpenter and KEDA. The README documents intended integrations, but no source excerpts were provided, so edges below reflect documented relationships rather than verified Terraform calls.

Main entry points: [`01-network/main.tf`](https://github.com/soo9725/k8s-terraform/blob/main/01-network/main.tf) (Network and storage), [`02-cluster/main.tf`](https://github.com/soo9725/k8s-terraform/blob/main/02-cluster/main.tf) (EKS cluster), [`05-app/webapp.yml`](https://github.com/soo9725/k8s-terraform/blob/main/05-app/webapp.yml) (Application manifests), [`04-ingress/helm.tf`](https://github.com/soo9725/k8s-terraform/blob/main/04-ingress/helm.tf) (Ingress and DNS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Foundation"]
  node_network["Network and storage<br/>[main.tf]"]
  node_cluster["EKS cluster<br/>[main.tf]"]
end

subgraph group_platform["Cluster Platform"]
  node_cluster_apps["Cluster applications<br/>[helm.tf]"]
  node_autoscaling["Autoscaling stack<br/>[helm.tf]"]
  node_registry["Harbor registry<br/>[helm.tf]"]
  node_kafka["Kafka cluster<br/>[kafka-cluster.tf]"]
  node_ingress["Ingress and DNS<br/>[helm.tf]"]
end

subgraph group_delivery["Application Delivery"]
  node_manifests["Application manifests<br/>[webapp.yml]"]
end

subgraph group_operations["Operations"]
  node_monitoring["Monitoring stack<br/>[helm.tf]"]
end

node_operator(("Infrastructure operator"))
node_github_actions(("GitHub Actions"))
node_aws{{"AWS resources"}}
node_s3[("S3 image storage")]
node_efs[("EFS persistence")]
node_kubernetes{{"Kubernetes"}}
node_application_users(("Application users"))

node_operator -->|"provisions"| node_network
node_operator -->|"provisions"| node_cluster
node_github_actions -->|"creates and deletes"| node_cluster
node_network -->|"creates infrastructure"| node_aws
node_cluster -->|"hosts"| node_kubernetes
node_cluster_apps -->|"installs services"| node_kubernetes
node_autoscaling -->|"scales workloads"| node_kubernetes
node_registry -->|"stores images"| node_s3
node_network -->|"provides storage"| node_s3
node_network -->|"provides persistence"| node_efs
node_ingress -->|"exposes services"| node_kubernetes
node_manifests -->|"deploys workloads"| node_kubernetes
node_manifests -->|"declares topic"| node_kafka
node_monitoring -->|"monitors cluster"| node_kubernetes
node_application_users -->|"accesses services"| node_ingress

click node_network "https://github.com/soo9725/k8s-terraform/blob/main/01-network/main.tf"
click node_cluster "https://github.com/soo9725/k8s-terraform/blob/main/02-cluster/main.tf"
click node_cluster_apps "https://github.com/soo9725/k8s-terraform/blob/main/02-cluster/helm.tf"
click node_autoscaling "https://github.com/soo9725/k8s-terraform/blob/main/02.5-autoscaling/helm.tf"
click node_registry "https://github.com/soo9725/k8s-terraform/blob/main/03-harbor/helm.tf"
click node_kafka "https://github.com/soo9725/k8s-terraform/blob/main/03.5-kafka/kafka-cluster.tf"
click node_ingress "https://github.com/soo9725/k8s-terraform/blob/main/04-ingress/helm.tf"
click node_manifests "https://github.com/soo9725/k8s-terraform/blob/main/05-app/webapp.yml"
click node_monitoring "https://github.com/soo9725/k8s-terraform/blob/main/06-monitoring/helm.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_network,node_cluster,node_application_users toneBlue
class node_cluster_apps,node_autoscaling,node_registry,node_kafka,node_ingress,node_s3,node_efs toneAmber
class node_manifests toneMint
class node_monitoring toneRose
class node_operator,node_github_actions,node_aws,node_kubernetes toneIndigo
```

## Components

### Foundation

- [Network and storage](https://github.com/soo9725/k8s-terraform/blob/main/01-network/main.tf): `01-network/main.tf`
- [EKS cluster](https://github.com/soo9725/k8s-terraform/blob/main/02-cluster/main.tf): `02-cluster/main.tf`

### Cluster Platform

- [Cluster applications](https://github.com/soo9725/k8s-terraform/blob/main/02-cluster/helm.tf): `02-cluster/helm.tf`
- [Autoscaling stack](https://github.com/soo9725/k8s-terraform/blob/main/02.5-autoscaling/helm.tf): `02.5-autoscaling/helm.tf`
- [Harbor registry](https://github.com/soo9725/k8s-terraform/blob/main/03-harbor/helm.tf): `03-harbor/helm.tf`
- [Kafka cluster](https://github.com/soo9725/k8s-terraform/blob/main/03.5-kafka/kafka-cluster.tf): `03.5-kafka/kafka-cluster.tf`
- [Ingress and DNS](https://github.com/soo9725/k8s-terraform/blob/main/04-ingress/helm.tf): `04-ingress/helm.tf`

### Application Delivery

- [Application manifests](https://github.com/soo9725/k8s-terraform/blob/main/05-app/webapp.yml): `05-app/webapp.yml`

### Operations

- [Monitoring stack](https://github.com/soo9725/k8s-terraform/blob/main/06-monitoring/helm.tf): `06-monitoring/helm.tf`

### Other components

- **Infrastructure operator**
- **GitHub Actions**
- **AWS resources**
- **S3 image storage**
- **EFS persistence**
- **Kubernetes**
- **Application users**

## Connections

- Infrastructure operator → Network and storage: provisions (evidence: `README.md`)
- Infrastructure operator → EKS cluster: provisions (evidence: `README.md`)
- GitHub Actions → EKS cluster: creates and deletes (evidence: `README.md`)
- Network and storage → AWS resources: creates infrastructure (evidence: `README.md`)
- EKS cluster → Kubernetes: hosts (evidence: `README.md`)
- Cluster applications → Kubernetes: installs services (evidence: `README.md`)
- Autoscaling stack → Kubernetes: scales workloads (evidence: `README.md`)
- Harbor registry → S3 image storage: stores images (evidence: `README.md`)
- Network and storage → S3 image storage: provides storage (evidence: `README.md`)
- Network and storage → EFS persistence: provides persistence (evidence: `README.md`)
- Ingress and DNS → Kubernetes: exposes services (evidence: `README.md`)
- Application manifests → Kubernetes: deploys workloads (evidence: `README.md`)
- Application manifests → Kafka cluster: declares topic (evidence: `README.md`)
- Monitoring stack → Kubernetes: monitors cluster (evidence: `README.md`)
- Application users → Ingress and DNS: accesses services (evidence: `README.md`)
