The original post: /r/selfhosted by /u/TryingToGetTheFOut on 2024-12-19 11:57:13.

TL;DR: Homelab infrastructure with Terraform and K8S https://github.com/cfstcyr/homelab-v3

I’ve recently started my journey to transition all my setup from Docker Compose to Terraform and Kubernetes. I felt I was limited by only using Docker Compose for everything external, so I wanted to try to make something a little more robust.

Here is what I manage to do:

  • One-click setup: Everything in my setup – application deployment, DNS records, tunnel, etc. – is deployed at once just by running Terraform.
  • More rebust setup: Docker Compose is great, but it is not production tool. It is great at launching stuff, but after that, every apps are on their own. With Kubernetes, I can go and delete a container, and it will re-deploy itself automatically.
  • Automatic secret management: My previous setup was a bit tiresome to setup. You needed to launch the apps, then go to each one, get the API key, put them in the environment file for Compose and then relaunch it. Now, I have a setup script for the \*arrs that provide my own API key. Meaning that in one step, every part of my setup can have access to the keys.

That being said, that setup is much more complex regarding code and concept to understand, but much easier to use. I can destroy everything and redeploy it in seconds.

Also, right now, buildarr is a bit behind from radarr and sonarr, so it’s not as automated as I would like.

For now, this version is only my light setup that runs on my laptop. This is why I don’t have many apps or medias, but I plan to transition my whole setup to that soon.

I am curious about what you think of it: https://github.com/cfstcyr/homelab-v3

https://preview.redd.it/m15jrrw2os7e1.png?width=3030&format=png&auto=webp&s=2230053b908700e32c8b3a368d31278224d16a57