Skip to content

My home Kubernetes (k3s) cluster managed by GitOps (Flux2)

License

Notifications You must be signed in to change notification settings

davosian/home-cluster

 
 

Repository files navigation

My home Kubernetes cluster ⛵

... managed by Flux and serviced with RenovateBot 🤖




Discord k3s pre-commit renovate


📖  Overview

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.


💻  Cluster setup

My cluster is k3s provisioned overtop Ubuntu 20.10 using the Ansible galaxy role ansible-role-k3s.

See my ansible folder for my playbooks and roles.


🤖  Automate all the things!

  • 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.

⚙️  Hardware

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

🌐  Networking

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.


🔧  Tools

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)

🤝  Thanks

A lot of inspiration for my cluster came from the people that have shared their clusters over at awesome-home-kubernetes

About

My home Kubernetes (k3s) cluster managed by GitOps (Flux2)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 77.6%
  • HTML 16.0%
  • Dockerfile 6.4%