2024-05-13
This collection of articles aims to describe my journey into building a personal Kubernetes cluster at home.
I took a lot of inspiration from the Small homelab K8s cluster on Proxmox VE series for both the structure and some of the content, but declined for my own needs and choices. That is a very high quality read.
It’s tough to trust big companies with our data these days1. I’ve been wanting to take control of my digital stuff for a while now. Sure, some things are tricky2 or pricey3 4 to self-host, but with a bit of effort, you can often get a setup that’s just as good or even better than those SaaS options.
My objective is not to ditch everything that is in the cloud, rather choosing what makes sense to self host and what doesn’t. I don’t think I will ever host a clone of Google Maps, but will most probably find an alternative to hosting my personal documents on Dropbox.
Last but not least, being myself a software engineer, this is also a good way to learn new things hands-on, because I learn best through hands-on experience.
Reliability is key because I’m the only one at home who can manage this setup. It needs to just work without me constantly tinkering.
So why Kubernetes5? I worked a tiny bit with it, and what I like is the way how it can automatically recover from failures (ie. a node going down). Eventually, after a very long setup, it hopefully will just run. Of course it will need to be maintained, but that is something one needs to take into account when self-hosting in general.
One big goal is to make the cluster super reliable, which means I need a few machines working together. I decided not to host very resource intensive services on the cluster for a few reasons:
Once everything’s up and running, I’ll play around with more demanding tasks like local AIs or media streaming.
Yep, Kubernetes can be heavy for a Raspberry Pi. So, I chose a super lightweight OS6 and a minimal Kubernetes distribution7. I’ll dive into the details in the next chapters.
I tried to give myself a few rules for building this projects so that I won’t be stuck in the design phase forever.
Slack has been using data from your chats to train its machine learning models: https://www.engadget.com/yuck-slack-has-been-scanning-your-messages-to-train-its-ai-models-181918245.html.↩︎
Self-hosting a password manager as Bitwarden requires a high level of security, it is most probably safer to just use the hosted version.↩︎
See Llama2 Memory Requirements to have an idea.↩︎
Self-hosting media can be very expensive as it requires a lot of fast storage, replication, and good hardwer for encoding/decoding.↩︎
From kubernetes.io: Kubernetes, also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications.↩︎
From dietpi.com: DietPi is extremely lightweight at its core, with features of low process/memory footprint and DietPi-RAMlog installed by default, to get the maximum performance from your device.↩︎
From k3s.io: The certified Kubernetes distribution built for IoT & Edge computing.↩︎