Little clusters of nucs has become a really common way to run small Kubernetes clusters at home. I recently rebuilt mine (still using a bulky, power hungry box like you're tossing) and have been very happy with it. Everything is really stable, containers that misbehave are automatically destroyed and replaced, and updates are breeze because everything lives in code/git.
What would be a benefit to run k8s at home, apart from bit dealing with it, compared to docker-compose on a single or two nodes? or docker swarm? Unless there is a big load of services that are selfhosted, which I get, and the autohealing from k8s as the orchestrator.
Just courious, not taking a swing. Thanks!
K8s really shines when you start hosting more stuff, even on a single node. I definitely recommend giving k3s a try. I wouldn't recommend it for only a couple of services though.
Is it overkill? Yes, applying docker-compose manually also works. But then you still have to make your reverse proxy, your certificate and all your services work together. You can write Ansible for it, but then you end up with a lot of custom code to maintain and you still don't get all the nice features.
For me the killer feature was flux. Your code, configs and even secrets live in git and get autodeployed and autohealed. And it has other features such as operators to fetch helm charts from other repos and apply your config to it.
Thanks for the reply, flux is pretty good, I'm using ArgoCD, but both are basically following gitops priciples.
I might give k3s a look and see how ot all work together.
I am in the sort of power hungry box category. The cost of NUCs have gone up in my area. I've found that the big box stuffed with second hand hardware to offer more value for my use case.
Ansible is definitely worth exploring. As usual, there are a million tutorials on YouTube that will walk you through a quick deployment and some basic playbooks, but if you want a more fulsome understanding and deeper overview, I'd look at Techworld with Nana's Ansible course. She's extremely thorough, and she has a bunch of other videos that might give you some ideas on how to clean up your lab, especially since you're starting fresh.
Just wanted to add that you can get Jeff Geerlings book "Ansible for DevOps" for free right now:
Awesome, thanks for the recommendation!
Thanks! How would you say the learning curve for Ansible is? I want to dedicate a week only to that so I got a little bit of time at the moment. My goal is to automate everything as much as possible and make the whole system low maintainance. I don't have the time anymore to fix stuff or maintain the whole thing multiple times a month.
I know, selfhosting always comes with the risk of everything crashing down, but that risk I'm taking and trying to mitigate it as much as possible with best practices etc.
Thus far I've had very little in the way of difficulty with my self-hosting. Just remember that backups become even more important.
As is the case with homelab in general, it's pretty simple and easy to get the basics, but Ansible can scale up to enterprise-grade complexity if you really want to go down a rabbit hole. For what you're describing, I think you'll find it to be pretty straightforward.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!