... managed by Flux and serviced with RenovateBot 🤖
This repository is my homelab Kubernetes cluster in a declarative state. Flux2 watches my cluster folder and makes the changes to my cluster based on the YAML manifests.
Feel free to open a Github issue or join the k8s@home Discord if you have any questions.
My cluster is k3s provisioned overtop Ubuntu 20.04.x using the Ansible galaxy role ansible-role-k3s.
See my ansible folder for my playbooks and roles.
Kured to apply OS patches to my nodes.- System Upgrade Controller to apply updates to k3s.
- Renovate keeps my application charts and container images up-to-date by scanning my repo and opening pull requests when it notices updates.
- Actions Runner Controller operates a self-hosted Github runner in my cluster which I use to generate and apply Sealed Secrets to my cluster.
My Kubernetes master and worker nodes below are running bare metal Ubuntu 20.04.x
Device | Count | OS Disk Size | Data Disk Size | Ram | Purpose |
---|---|---|---|---|---|
Intel NUC8i3BEK | 1 | 256GB NVMe | N/A | 16GB | Kubernetes k3s Master |
Intel NUC8i5BEH | 3 | 120GB SSD | 1TB NVMe (rook-ceph) | 32GB | Kubernetes k3s Workers |
Intel NUC8i7BEH | 2 | 750GB SSD | 1TB NVMe (rook-ceph) | 64GB | Kubernetes k3s Workers |
Qnap NAS (rocinante) | 1 | N/A | 8x12TB RAID6 | 16GB | Media and shared file storage |
Synology NAS (serenity) | 1 | N/A | 8x12TB RAID6 | 4GB | Media and shared file storage |
In my cluster I run coredns, etcd, and external-dns. External-DNS populates CoreDNS with all my ingress records and stores it in etcd. When I'm browsing any of the webapps while on my home network, the traffic is being routed internally and never makes a round trip. The way I set this up is in my router. When a DNS request is made for my domain or any of my subdomains it uses coredns as the DNS server, otherwise it uses whatever upstream DNS I provided.
Below are some of the tools I find useful for working with my cluster
Tool | Purpose |
---|---|
direnv | Set KUBECONFIG environment variable based on present working directory |
git-crypt | Encrypt certain files in my repository that can only be decrypted with a key on my computers |
go-task | Replacement for make and makefiles, who honestly likes that? |
pre-commit | Ensure the YAML and shell script in my repo are consistent |
kubetail | Tail logs in Kubernetes, also check out stern (which fork? good luck) |
A lot of inspiration for my cluster came from the people that have shared their clusters over at awesome-home-kubernetes