The Magic of GitOps

Apr 7, 2025

Introduction

Over the past few days, I decided to dive into building my own homelab, you can actually check out the repo here if you're curious ^^.

While researching which technologies to use, I stumbled upon the concept of GitOps, a very interesting way to manage and deploy applications.

Mindset

When we think about a classic homelab setup, the first idea that comes to mind is spinning up a server and manually configuring everything with tons of clicks and web interfaces.

But when you start deploying multiple servers, those manual steps quickly become repetitive. That’s where automation steps in! This beautiful concept is here to make our lives easier. And we can bring automation to our homelab using Kubernetes along with a GitOps system.

GitOps is all about having a single source of truth, which, in our case, is our Git repository. The system checks the configurations defined in the Git repo and applies them to our cluster accordingly.

GitOps falls under the broader umbrella of infrastructure as code, which means managing your infrastructure using config files. This approach helps keep everything maintainable and standardized.

In Practice

To explain this without getting too technical: let’s say my Git repo is a file which specifies that I want one instance of a web server. The GitOps system will deploy exactly one web server in my cluster.

Now, if I currently have two web servers running, the system will automatically remove one to match what’s defined in the Git repo.

So it’s not just blindly deploying apps, it’s intelligently managing the cluster to align with the needs defined in our source of truth.

GitOps in a nutshell

One of the major benefits of using Git as the source of truth is version control. Everything is tracked and saved, giving us the flexibility to roll back changes if needed.

My Use Case

Infrastructure automation is becoming one of the biggest challenges for IT departments. Personally, I’m testing out FluxCD. Even though I’m only using it in a small-scale homelab, I can already see all the benefits.

Honestly, after trying out this philosophy, I’m pretty confident I won’t be going back to the old-school homelab setup with Proxmox and a bunch of VMs.

GitOps has all the advantages and prerequisites to be adopted in large-scale enterprise infrastructures. In fact, it’s already happening, more and more companies are moving toward this GitOps approach, which bundles together many of the best DevOps practices.

Great Resources

If you’re interested in diving deeper into this fascinating topic, here are some great resources I recommend:

https://yoanbaulande.com/posts/feed.xml