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.
My Kubernetes cluster is deployed with Talos.
- cert-manager: Creates TLS certificates for services in my cluster.
- cilium: eBPF-based networking for my workloads.
- cloudflared: Enables Cloudflare secure access to my routes.
- external-dns: Automatically syncs ingress DNS records to a DNS provider.
- external-secrets: Managed Kubernetes secrets using Bitwarden.
- rook: Distributed block storage for peristent storage.
- sops: Managed secrets for Kubernetes and Terraform which are commited to Git.
- spegel: Stateless cluster local OCI registry mirror.
- volsync: Backup and recovery of persistent volume claims.
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/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
├── 📁 apps # applications
├── 📁 components # re-useable kustomize components
└── 📁 cluster # flux system configuration
While most of my infrastructure and workloads are self-hosted I do rely upon the cloud for certain key parts of my setup.
Service | Use | Cost |
---|---|---|
Bitwarden | Secrets with External Secrets | Free |
Cloudflare | Domain, S3 and Tunnel | ~$12/yr |
Discord | Alerts and Notifications | Free |
Github | Github Actions | Free |
Let's Encrypt | TLS certificates | Free |
Terraform Cloud | Terraform State | Free |
Total: ~$1/mo |
In my cluster there are two instances of ExternalDNS running. One for syncing private DNS records to my Pi-hole
, while another instance syncs public DNS to Cloudflare
. This setup is managed by creating httproutes with two specific gateways: internal
for private DNS and external
for public DNS. The external-dns
instances then syncs the DNS records to their respective platforms accordingly.
Device | Num | OS Disk Size | Data Disk Size | Ram | OS | Function |
---|---|---|---|---|---|---|
Custom PC (Intel Core i5-13600K) | 1 | 500GB SSD | 3.84TB (local) / 3x1TB (rook-ceph) / 2x4TB (NAS) | 128GB | Proxmox | Kubernetes + NAS |
TP-Link AX5400 | 1 | - | - | - | - | Router |
Thanks to all the people who donate their time to 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 could deploy.