Skip to content

rem1niscence/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

557 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homelab Cluster

My homelab K3s cluster configuration

Hardware

Device Count RAM Disks OS Arch
Intel NUC I7 10th Gen 1 40GB SSD 4TB (X2)
SSD 2TB (X2)
Micro SD 1TB (X2)
USB 512GB
TrueNAS SCALE amd64
Intel NUC I7 10th Gen 1 32GB SSD 256GB Ubuntu 24.04 amd64
Beelink SER5 1 40 GB SSD 512GB Ubuntu 24.04 amd64
Raspberry Pi 4 2 8 GB SD 32GB Raspberry PI OS armv7
Raspberry Pi 4 1 4 GB SD 32GB Raspberry PI OS armv7

Repository structure

├── ansible       # Management of cluster and non cluster instances
│   ├── inventory # Dynamic inventory, generated by terraform
│   ├── playbooks # Usual Ansible playbooks 
│   ├── roles     # Reusable Ansible roles
├── k8s           # Kubernetes cluster configuration / resources
│   ├── apps      # Apps of apps definitions
│   ├── charts    # Local helm charts
│   ├── system    # System apps definitions
│   ├── values    # Helm values files
│   └── workloads # Kubernetes workloads definitions
└── terraform     # Resource provisioning
    ├── infra     # Infrastructure provisioning (Cloudflare DNS, Hetzner, etc.)
    └── k8s       # Critical cluster provisioning (config, cilium, argocd, etc.)

Architecture

flowchart TD
    R2["☁️ Cloudflare R2 (TF State)"]

    R2 --> TF_INFRA
    R2 --> TF_K8S
    

    TF_INFRA["terraform/infra"]
    TF_INFRA -->|provisions| INFRA_RESOURCES["Ansible Inventory"]
    
    TF_INFRA -->|provisions| INFRA_DNS["DNS"]
    INFRA_DNS -->|cluster domain| WG_PEER["🔒 WireGuard peer IP"] -.-|VPN required| INTERNET

    TUNNEL_VM["☁️ Tunnel VM"]
    INTERNET["🌐 Internet"]

    TF_INFRA -->|provisions| CLOUD_VM
    TF_INFRA -.->|registers| LOCAL
    TF_INFRA -->|provisions| TUNNEL_VM

    INFRA_DNS -->|tunnel domain| TUNNEL_VM

    INFRA_RESOURCES -->|consumed by| ANSIBLE["Ansible"]
    ANSIBLE -->|manages| ANSIBLE_RESOURCES["Server setup · CronJobs"]
    ANSIBLE --->|creates| CLUSTER
    ANSIBLE -->|manages| TUNNEL_VM

    ANSIBLE_RESOURCES -->|applies to| CLOUD_VM
    ANSIBLE_RESOURCES -->|applies to| LOCAL

    subgraph CLUSTER["k3s cluster"]
        subgraph NODES["Nodes"]
            CLOUD_VM["☁️ Cloud VM"]
            LOCAL <.->|Wireguard mesh| CLOUD_VM
            LOCAL["🏠 Local nodes"]
        end
        ARGOCD["ArgoCD"]
        ARGOCD -->|deploys to| NODES
        CILIUM["Cilium"]
    end

    NAS["💾 NAS"]
    CLOUD_VM -.->|storage through wireguard| NAS
    LOCAL -->|local storage| NAS

    TF_K8S["terraform/k8s"]
    TF_K8S -->|bootstraps| ARGOCD
    TF_K8S --->|bootstraps| CILIUM

    CLUSTER -->|tunnels| TUNNEL_VM
    TUNNEL_VM --- |exposes| INTERNET
Loading

Credits to

About

Homelab setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors