What is GitOps?

GitOps is a way of managing infrastructure and deployments using Git as your source of truth. Learn what it is, how it relates to DevOps, and where it fits in modern workflows.

What is GitOps?
What is GitOps?

There is a lot of terminology these days, between DevOps, SecOps, DevSecOps, and GitOps. It can be hard to keep track of everything and the benefits of each approach. Let's explore GitOps.

What is GitOps?

GitOps is a way of managing infrastructure and application deployments using Git as the single source of truth.

GitOps is built around the Developer experience. But it can help the Operations teams manage infrastructure. Using the same processes and tools that Developers use for software development. When using GitOps, Git is the central tool but all other tools can be chosen as needed.

GitOps uses a central Git repository that contains the entire state of the system. It uses Git pull requests to automatically manage and deploy infrastructure or software. The Git repository gives you a trail of changes that can be auditable.

Why do you need GitOps?

The main benefits of GitOps are visibility, control, and automation.

Using Git for your infrastructure and application code gives you full traceability. You can see exactly what changed, when it changed, and who approved it. Want to know when a network rule was updated or when a specific version of your app was deployed? That information is all stored in your Git history.

Automation is another key part of GitOps. Once your changes are approved, a GitOps tool picks them up and deploys them automatically. This happens in a repeatable, consistent way, reducing manual effort and the risk of errors.

GitOps vs DevOps?

There is some overlap between GitOps and DevOps, but they are not the same thing.

DevOps is a culture and set of practices focused on improving collaboration between development and operations teams. It encourages automation, continuous integration (CI), and continuous delivery (CD), but it isn’t tied to any one toolset. If you’re new to CI/CD, I’ve written a beginner’s guide to pipeline tools that explains how they work and what tools to consider.

GitOps is a more defined approach. It uses Git as the single source of truth for infrastructure and application deployments. Changes are made through pull requests, and automation tools apply those changes to your systems.

GitOps can be seen as a way of putting DevOps principles into action, especially around automation, traceability, and consistency. It tends to follow a stricter pattern, whereas DevOps can be more flexible depending on your processes and tools.

Is GitOps just for Kubernetes?

No it's isn't just for Kubernetes. GitOps is often associated with Kubernetes because it's configuration can be entirely declarative in the form of YAML manifests. And lends itself very well to being stored inside version control.

Learn Git

If you are looking to learn more about Git, or learn some tips and tricks that can help enhance your knowledge, check out my Git for everyone series of blogs.