Skip to content

chr1sd/home-ops

Repository files navigation

    __   ____          ___             __                 __                     ___   __  _
   / /__( __ )_____   / _/  ____ _____/ /   _____  ____  / /___  __________     /  /  / /_(_)___ ___  ___
  / //_/ __  / ___/  / /   / __ `/ __  / | / / _ \/ __ \/ __/ / / / ___/ _ \    / /  / __/ / __ `__ \/ _ \
 / ,< / /_/ (__  )  / /   / /_/ / /_/ /| |/ /  __/ / / / /_/ /_/ / /  /  __/   / /  / /_/ / / / / / /  __/
/_/|_|\____/____/  / /    \__,_/\__,_/ |___/\___/_/ /_/\__/\__,_/_/   \___/  _/ /   \__/_/_/ /_/ /_/\___/
                  /__/                                                      /__/

DiscordΒ Β  TalosΒ Β  KubernetesΒ Β  FluxΒ Β 

Age-DaysΒ Β  Uptime-DaysΒ Β  Node-CountΒ Β  Pod-CountΒ Β  CPU-UsageΒ Β  Memory-UsageΒ Β 


πŸ‘‹ Welcome

Welcome to the (Kubernetes) Humble Home Lab repo. The source of truth for my bare metal cluster running on Talos Linux.

The goal here is to deepen my understanding of k8s, become the GitOps mindset, and share what I learn along the way.


πŸ€– Hardware

System Role CPU RAM Graphics Disk (boot) Disk (storage)
(3x) HP EliteDesk 800 G3 Mini Control Plane Intel i5-6500T 16GB DDR4 Intel HD 530 256GB SSD β€”
(3x) HP EliteDesk 800 G3 Mini Worker Intel i5-6500T 64GB DDR4 Intel HD 530 512GB SSD 1TB NVMe
Custom Server AI Workloads + NAS Intel i7-6700K 64GB DDR4 RTX3090 256GB SSD 50TB RaidZ2 Pool (4x 28TB Disks)

All of this is connected to a Ubiquiti network with VLANS configured for IoT, Management, DMZ, and Cameras.


πŸ”’ Talos Linux

Talos is an immutable, API driven operating system designed specifically for Kubernetes. Talos is configured declaritively and is a great choice for a GitOps driven workflow.


πŸš€ Kubernetes

For me, a home lab about tinkering and learning. So I set off to learn Kubernetes with a goal to grow my skillset and have an infrastructure that allows me to scale and provide useful, locally hosted applications for my family.


🌏 Networking: Cilium

Networking in my cluster is handled by Cilium.

I'm using Envoy Gateway to manage application traffic coming into the cluster.


πŸ“ˆ Observability Stack

To keep a pulse on the cluster, I'm using: Prometheus, Grafana, VictoriaLogs, Alertmanager, Gatus, and Fluentbit.


πŸ’Ž Storage: Rook + Ceph

Persistent storage is provided by Rook-Ceph, utilizing the 1TB NVMe drives on each worker.


βš™οΈ GitOps with Flux

The backbone of this cluster is Flux CD β€” a GitOps controller that reconciles my entire Kubernetes state from a Git repository.

My ultimate goal is to have Flux and Renovate handle most of the deployments and updates to the cluster.

How does it work?

The core idea: Git is the single source of truth. Flux continuously compares what's in Git against what's running in the cluster, and corrects any difference β€” whether that's a new commit you pushed, or a "drift" caused by a manual change someone made directly on the cluster.

See Flux in action
flowchart TD
    Dev["πŸ‘©β€πŸ’» You push YAML to Git"] --> Git[("πŸ“‚ Git Repo
    Source of Truth")]
    Git -->|"Flux polls ~every 1 min"| Fetch["Flux fetches
    latest manifests"]
    Fetch --> Diff{"Cluster state = Git state?"}
    Diff -->|"βœ… Already in sync"| Idle["Flux idles"]
    Idle -.->|"next poll"| Fetch
    Diff -->|"❌ Out of sync"| Apply["Flux applies manifests to Kubernetes"]
    Apply --> Cluster["☸️ Kubernetes creates / updates resources"]
    Cluster -->|"sync complete"| Diff
    Drift["⚠️ Someone manually changes the cluster"] -.->|"causes drift"| Diff

    classDef gitNode fill:#6e40c9,stroke:#4a2d8c,color:#fff
    classDef fluxNode fill:#326ce5,stroke:#1e4db3,color:#fff
    classDef k8sNode fill:#81D4FA,stroke:#0277BD,color:#000
    classDef devNode fill:#2ea44f,stroke:#1a7036,color:#fff
    classDef driftNode fill:#FFE082,stroke:#F57C00,color:#000

    class Git gitNode
    class Fetch,Diff,Idle fluxNode
    class Apply,Cluster k8sNode
    class Dev devNode
    class Drift driftNode
Loading

The magic of GitOps: if someone manually tweaks a resource directly on the cluster, Flux detects the drift and reverts it back to what Git says it should be. The cluster always converges to Git β€” not the other way around.


I made a Youtube video that gives a general overview of my configuration and the core components.

Youtube Video

🚧 Foundation: onedr0p's Cluster Template

Special thanks to the most excellent onedr0p/cluster-template. It provides a clean, modern foundation for Talos + Flux-based clusters β€” and taught me how to organize manifests properly, use SOPS, and implement GitOps the right way.

Flux Cluster Template Flux Cluster Template Stars


🀯 Start This Journey Today

If you're interested in this type of thing, I encourage you to build your own home lab. It doesn't have to be Kubernetes. Grab ANY old computer and see what you can deploy on it.

Embrace the process. It will be infuriating at times, blissful at others.

You'll build some really cool stuff along the way. And your brain waves will expand.


🌟 Stargazers

Star History Chart

Releases

No releases published

Packages

 
 
 

Contributors

Generated from onedr0p/cluster-template