This is a monorepository for my home Kubernetes clusters. I try to adhere to Infrastructure as Code (IaC) and GitOps practices using tools like OpenTofu, Kubernetes, Flux, Renovate, and GitHub Actions.
The purpose here is to learn k8s, while practicing Gitops.
My Kubernetes clusters are deployed with Talos. One is a test cluster, one is a low-power utility cluster, running important services, and the other is a semi-hyper-converged cluster, workloads and block storage are sharing the same available resources on my nodes while I have a separate NAS with ZFS for NFS/SMB shares, bulk file storage and backups.
There is a template over at onedr0p/cluster-template if you want to try and follow along with some of the practices I use here.
- Networking & Ingress: cilium provides eBPF-based networking (kube-proxy replacement, BGP on main/utility, L2 announcements on test), and multus adds secondary pod networks on main and utility. Envoy Gateway implements the Gateway API for L7 ingress through the
envoy-internalandenvoy-externalGateways. Towonel (via towonel-operator) fronts public ingress through a small OVH VPS, and external-dns keeps DNS records in sync automatically. - Security & Secrets: cert-manager automates SSL/TLS certificate management. For secrets, I use external-secrets with 1Password Connect to inject secrets into Kubernetes.
- Storage & Data Protection: rook provides distributed Ceph storage on main.
local-hostpathvolumes come from openebs on main and democratic-csi on utility and test. kopiur takes Kopia backups of PVCs into a repository on the NAS. spegel runs a stateless, cluster-local OCI image mirror on main. - Automation & CI/CD: flux-operator manages each cluster's Flux install through a
FluxInstance. actions-runner-controller runs self-hosted GitHub Actions runners directly in the cluster for continuous integration workflows. tuppr drives Talos and Kubernetes upgrades fromTalosUpgrade/KubernetesUpgraderesources. For IaC, tofu-controller runs OpenTofu from within the utility cluster.
Flux watches the clusters in my kubernetes folder (see Directories below) and makes the changes to my clusters based on the state of my Git repository.
The way Flux works for me here is it will apply the kubernetes/apps/${cluster} folder. Each namespace directory there has a kustomization.yaml that pulls in the components/namespace component (the Namespace resource and alerts) and lists one Flux Kustomization per app (<app>.yaml), each pointing at that app's manifests in kubernetes/apps/base/<namespace>/<app>. Under the control of those Flux Kustomizations there will be a HelmRelease or other resources related to the application which will be applied.
Renovate watches my entire repository looking for dependency updates, when they are found a PR is automatically created. When some PRs are merged Flux applies the changes to my cluster.
This Git repository contains the following directories under Kubernetes.
📁 kubernetes
├── 📁 apps # app configurations
│ ├── 📁 base # base app configuration
│ ├── 📁 main # cluster specific overlay
│ ├── 📁 utility
│ ├── 📁 test
├── 📁 clusters # Cluster flux configurations
│ ├── 📁 main
│ ├── 📁 utility
│ ├── 📁 test
├── 📁 components # re-useable componentsWhile most of my infrastructure and workloads are self-hosted I do rely upon the cloud for certain key parts of my setup. This saves me from having to worry about two things. (1) Dealing with chicken/egg scenarios and (2) services I critically need whether my cluster is online or not.
The alternative solution to these two problems would be to host a Kubernetes cluster in the cloud and deploy applications like HCVault, Vaultwarden, and ntfy. However, maintaining another cluster and monitoring another group of workloads is a lot more time and effort than I am willing to put in.
The one exception is status monitoring: the OVH VPS (Columbina) that fronts Towonel also runs a standalone Gatus as a buddy monitor. It watches the clusters' status pages and receives Alertmanager heartbeats from the main and utility clusters, alerting to Discord if a cluster goes dark, while the main cluster's Gatus watches Columbina in return.
| Service | Use | Cost |
|---|---|---|
| 1Password | Secrets with External Secrets | ~$80/yr |
| Cloudflare | Domain, DNS, WAF and R2 bucket (S3 Compatible endpoint) | ~$40/yr |
| GitHub | Hosting this repository and continuous integration/deployments | Free |
| Healthchecks.io | Monitoring internet connectivity and external facing applications | Free |
| OVHcloud | VPS edge for Towonel and out-of-cluster status monitoring | ~$6/mo |
| UptimeRobot | External uptime monitors (managed in terraform/uptimerobot) |
Free |
| Total: ~$16/mo |
In my clusters there are two instances of ExternalDNS running. unifi-dns syncs private DNS records to my UDM-SE using ExternalDNS webhook provider for UniFi, from every HTTPRoute and from Services with an external-dns.kubernetes.io/hostname annotation. cloudflare-dns syncs public DNS to Cloudflare from HTTPRoutes attached to the envoy-external Gateway and from DNSEndpoint resources. There are no Ingress objects: an app attaches its HTTPRoute to envoy-internal for private access or envoy-external for public access.
| Name | Device | CPU | OS Disk | Local Disk | Rook Disk | RAM | OS | Purpose |
|---|---|---|---|---|---|---|---|---|
| Ayaka | MS-01 | i9-13900H | 960GB NVMe | 1TB NVMe | 1.92TB U.2 | 128GB | Talos | k8s control-plane |
| Eula | MS-01 | i9-13900H | 960GB NVMe | 1TB NVMe | 1.92TB U.2 | 128GB | Talos | k8s control-plane |
| Ganyu | MS-01 | i9-13900H | 960GB NVMe | 1TB NVMe | 1.92TB U.2 | 128GB | Talos | k8s control-plane |
| Skirk | Bosgame M5 (Halo Strix) | Ryzen AI Max+ 395 | 500GB NVMe | 2TB NVMe | - | 128GB | Talos | k8s worker (LLM) |
Control Plane OS Disk: m.2 Samsung PM9A3 960GB Control Plane Local Disk: m.2 WD SN770 1TB Control Plane Rook Disk: u.2 Samsung PM9A3 1.92TB Ganyu GPU: NVIDIA RTX 3090 24GB (OCuLink eGPU) Skirk GPU: Strix Halo iGPU
Total CPU: 58 Cores/92 Threads Total RAM: 512GB
| Name | Device | CPU | OS Disk | Local Disk | RAM | OS | Purpose |
|---|---|---|---|---|---|---|---|
| Celestia | Bosgame P1 | Ryzen 7 5700U | 500GB SSD | 1TB NVMe | 64GB | Talos | k8s control-plane |
OS Disk: 2.5" Samsung 870 EVO SSD Local Disk: m.2 WD SN770 1TB
Total CPU: 8 Cores/16 Threads Total RAM: 64GB
| Name | Device | CPU | OS Disk | Local Disk | RAM | OS | Purpose |
|---|---|---|---|---|---|---|---|
| Citlali | Beelink Mini-S | Celeron N5095 | 1TB M.2 SATA | 480GB SSD | 32GB | Talos | k8s control-plane |
OS Disk: m.2 Timetec SATA SSD Local Disk: 2.5" Kingston SA400 SSD
Total CPU: 4 Cores/4 Threads Total RAM: 32GB
| Name | Device | CPU | OS Disk | Data Disk | RAM | OS | Purpose |
|---|---|---|---|---|---|---|---|
| Voyager | MS-01 | i5-12600H | 32GB USB | - | 96GB | Unraid | NAS/NFS/Backup |
| DAS | Lenovo SA120 | - | - | 6x14TB Raidz2 | - | - | ZFS |
| Venti | Raspberry Pi5 | Cortex A76 | 250GB NVMe | - | 8GB | Raspbian | NUT/SSH (Main) |
| Sayu | Raspberry Pi5 | Cortex A76 | 500GB NVMe | - | 8GB | Raspbian | NUT/SSH (Utility) |
| PiKVM | Raspberry Pi4 | Cortex A72 | 64GB mSD | - | 4GB | PiKVM (Arch) | KVM (Main) |
| JetKVM | JetKVM | RV1106G3 | 8GB EMMC | - | 256MB | Linux 5.10 | KVM (Utility) |
| PDU | UniFi USP PDU Pro | - | - | - | - | - | PDU |
| TESmart | 8 port KVM | - | - | - | - | - | Network KVM |
| Device | Purpose |
|---|---|
| Unifi UDM-SE | Network - Router |
| Back-UPS 600 | Network - UPS |
| Unifi USW-Enterprise-24-PoE | Server - 2.5G Switch |
| Unifi USW-Aggregation | Server - 10G Switch |
| Tripp Lite 1500 | Server - UPS |
| Ecoflow Delta 3 Plus | Server - UPS |
Big shout out to the cluster-template, and the Home Operations Discord community. Be sure to check out kubesearch.dev for ideas on how to deploy applications or get ideas on what you may deploy.
