# hotosm/k8s-infra architecture

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

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

## Overview

This repository provisions and operates HOT’s Kubernetes infrastructure on AWS, then deploys platform services and applications into it. The principal workflow is an operator running Terraform to establish cloud and cluster infrastructure, bootstrapping Kubernetes/Argo CD, and managing app and database deployments through repository manifests. The graph includes workload, storage, and operations branches represented in the tree. README and sampled source excerpts were unavailable beyond the top-level README, so links between individual unsampled components are omitted where their wiring is uncertain.

Main entry points: [`apps/argocd.yaml`](https://github.com/hotosm/k8s-infra/blob/main/apps/argocd.yaml) (Argo CD), [`terraform`](https://github.com/hotosm/k8s-infra/tree/main/terraform) (Terraform infrastructure), [`kubernetes/argocd-bootstrap/root-app.yaml`](https://github.com/hotosm/k8s-infra/blob/main/kubernetes/argocd-bootstrap/root-app.yaml) (Argo CD bootstrap), [`apps/cluster-core`](https://github.com/hotosm/k8s-infra/tree/main/apps/cluster-core) (Cluster core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provisioning["Cloud Provisioning"]
  node_terraform["Terraform infrastructure"]
  node_aws["AWS resources"]
end

subgraph group_platform["Cluster Platform"]
  node_cluster{{"Kubernetes cluster"}}
  node_bootstrap["Argo CD bootstrap<br/>[root-app.yaml]"]
  node_argocd["Argo CD<br/>[argocd.yaml]"]
  node_core["Cluster core"]
  node_database_operator["CloudNativePG<br/>[cloudnativepg.yaml]"]
end

subgraph group_workloads["Cluster Workloads"]
  node_appdefs["Application manifests"]
  node_databases[("Database clusters")]
  node_fair["fAIr services"]
  node_oam["OpenAerialMap services"]
  node_other_apps["Other applications"]
end

subgraph group_operations["Operations"]
  node_monitoring["Monitoring"]
  node_backup["Backup configuration"]
  node_scripts["Operations scripts"]
end

node_operator(("Cluster operator"))

node_operator -->|"runs"| node_terraform
node_terraform -->|"provisions"| node_aws
node_aws -->|"hosts"| node_cluster
node_operator -->|"applies"| node_bootstrap
node_bootstrap -->|"bootstraps"| node_cluster
node_argocd -->|"runs on"| node_cluster
node_argocd -->|"deploys"| node_appdefs
node_core -->|"configures"| node_cluster
node_database_operator -->|"runs on"| node_cluster
node_databases -->|"deploys to"| node_cluster
node_fair -->|"deploys to"| node_cluster
node_oam -->|"deploys to"| node_cluster
node_other_apps -->|"deploys to"| node_cluster
node_monitoring -->|"monitors"| node_cluster
node_backup -->|"configures backups"| node_cluster
node_scripts -.->|"supports operations"| node_operator

click node_terraform "https://github.com/hotosm/k8s-infra/tree/main/terraform"
click node_bootstrap "https://github.com/hotosm/k8s-infra/blob/main/kubernetes/argocd-bootstrap/root-app.yaml"
click node_argocd "https://github.com/hotosm/k8s-infra/blob/main/apps/argocd.yaml"
click node_appdefs "https://github.com/hotosm/k8s-infra/tree/main/apps"
click node_core "https://github.com/hotosm/k8s-infra/tree/main/apps/cluster-core"
click node_databases "https://github.com/hotosm/k8s-infra/tree/main/databases"
click node_database_operator "https://github.com/hotosm/k8s-infra/blob/main/apps/cloudnativepg.yaml"
click node_fair "https://github.com/hotosm/k8s-infra/tree/main/apps/fair"
click node_oam "https://github.com/hotosm/k8s-infra/tree/main/apps/oam"
click node_other_apps "https://github.com/hotosm/k8s-infra/tree/main/apps"
click node_monitoring "https://github.com/hotosm/k8s-infra/tree/main/apps/monitoring"
click node_backup "https://github.com/hotosm/k8s-infra/tree/main/backup"
click node_scripts "https://github.com/hotosm/k8s-infra/tree/main/scripts"

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_terraform,node_aws toneBlue
class node_cluster,node_bootstrap,node_argocd,node_core,node_database_operator toneAmber
class node_appdefs,node_databases,node_fair,node_oam,node_other_apps toneMint
class node_monitoring,node_backup,node_scripts toneRose
class node_operator toneIndigo
```

## Components

### Cloud Provisioning

- [Terraform infrastructure](https://github.com/hotosm/k8s-infra/tree/main/terraform): `terraform`
- **AWS resources**

### Cluster Platform

- **Kubernetes cluster**
- [Argo CD bootstrap](https://github.com/hotosm/k8s-infra/blob/main/kubernetes/argocd-bootstrap/root-app.yaml): `kubernetes/argocd-bootstrap/root-app.yaml`
- [Argo CD](https://github.com/hotosm/k8s-infra/blob/main/apps/argocd.yaml): `apps/argocd.yaml`
- [Cluster core](https://github.com/hotosm/k8s-infra/tree/main/apps/cluster-core): `apps/cluster-core`
- [CloudNativePG](https://github.com/hotosm/k8s-infra/blob/main/apps/cloudnativepg.yaml): `apps/cloudnativepg.yaml`

### Cluster Workloads

- [Application manifests](https://github.com/hotosm/k8s-infra/tree/main/apps): `apps`
- [Database clusters](https://github.com/hotosm/k8s-infra/tree/main/databases): `databases`
- [fAIr services](https://github.com/hotosm/k8s-infra/tree/main/apps/fair): `apps/fair`
- [OpenAerialMap services](https://github.com/hotosm/k8s-infra/tree/main/apps/oam): `apps/oam`
- [Other applications](https://github.com/hotosm/k8s-infra/tree/main/apps): `apps`

### Operations

- [Monitoring](https://github.com/hotosm/k8s-infra/tree/main/apps/monitoring): `apps/monitoring`
- [Backup configuration](https://github.com/hotosm/k8s-infra/tree/main/backup): `backup`
- [Operations scripts](https://github.com/hotosm/k8s-infra/tree/main/scripts): `scripts`

### Other components

- **Cluster operator**

## Connections

- Cluster operator → Terraform infrastructure: runs
- Terraform infrastructure → AWS resources: provisions
- AWS resources → Kubernetes cluster: hosts
- Cluster operator → Argo CD bootstrap: applies
- Argo CD bootstrap → Kubernetes cluster: bootstraps
- Argo CD → Kubernetes cluster: runs on
- Argo CD → Application manifests: deploys
- Cluster core → Kubernetes cluster: configures
- CloudNativePG → Kubernetes cluster: runs on
- Database clusters → Kubernetes cluster: deploys to
- fAIr services → Kubernetes cluster: deploys to
- OpenAerialMap services → Kubernetes cluster: deploys to
- Other applications → Kubernetes cluster: deploys to
- Monitoring → Kubernetes cluster: monitors
- Backup configuration → Kubernetes cluster: configures backups
- Operations scripts → Cluster operator: supports operations
