This is a mono repository for my home infrastructure and Kubernetes cluster. I try to adhere to Infrastructure as Code (IaC) and GitOps practices using tools like Ansible, Terraform, Kubernetes, Flux, Renovate, and GitHub Actions.
If you want to try and follow along with how I built my cluster and with some of the practices I use please check out the amazing template here:
My cluster is k3s provisioned inside Proxox on VMs running Debian using the Ansible galaxy role ansible-role-k3s. This is a semi-hyper-converged 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 recursively search the kubernetes/${cluster}/apps
folder until it finds the most top level kustomization.yaml
per directory and then apply all the resources listed in it. That aforementioned kustomization.yaml
will generally only have a namespace resource and one or many Flux kustomizations (ks.yaml
). 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
├── 📁 main # main cluster
│ ├── 📁 apps # applications
│ ├── 📁 bootstrap # bootstrap procedures
│ ├── 📁 flux # core flux configuration
│ └── 📁 templates # re-useable components
This is a high level diagram of how my kubernetes infrastructure is setup
Device | Count | OS Disk Size | Ram | Operating System | Purpose |
---|---|---|---|---|---|
Dell Poweredge R730 | 1 | 2x 2TB Raid1 ZFS | 128GB | Proxmox | Virtualization Host |
Unifi Dream Machine Pro | 1 | - | - | Router / FW DHCP Main Lan | |
Unifi US 24 250w PoE | 1 | - | - | PoE for APs etc (1Gbe) | |
Unifi US 48 G1 | 1 | - | - | Primary Switch (1Gbe) | |
Unifi U6 Lite | 3 | - | - | Wirless Access Points (PoE) |
Device | Count | OS Disk Size | Data Disk Size | CPU | Ram | Operating System | Purpose |
---|---|---|---|---|---|---|---|
Arccorp, Crusader, Hurston | 3 | 250GB SSD: VT-d | 2TB SSD: VT-d (rook-ceph) | 12c | 24GB | Debian | Kubernetes Masters |
Stormwind | 1 | 40GB | - | 02c | 02GB | Windows Server 2022 | DNS / DHCP |
rclone-proxmox | 1 | 08GB | - | 01c | 01GB | Ubuntu (lxc) | Sync Proxmox backups to Backblaze B2 |
Thanks to all the people who donate their time in the Home Operations and TechnoTim Discord Communities for all of their support
See my awful commit history
See LICENSE