In this blog series, we’re getting up close and personal with GitOps, bringing you the whats, whys, and hows of this transformational framework. So far, we’ve covered the
difference between GitOps and DevOps and some of the
challenges GitOps poses. This article takes a look at how GitOps can be used to manage Kubernetes, and the pros and cons of this in practice.
GitOps is an operational framework applied to infrastructure automation. As the name suggests, it’s tied to a specific tool – Git. Git is a popular distributed version control system. It helps teams of developers work together on a codebase. With Git, various branches of code can be stored and worked on before they’re merged into production. And older versions of code are kept, so you can easily roll back to your last good version.
The key mechanism that makes GitOps work is the pull request. It’s the process developers use to submit their code. Developers formally ask for the code they’ve been working on to be integrated into another branch. And a GitOps operator picks up the commit and pulls in the new state declaration from Git. Pull requests give team members the chance to collaborate and reach a consensus.
While GitOps is relevant to all types of infrastructure automation, including virtual machines (VMs) and containers, it’s often touted as an effective way to manage Kubernetes.