The term was first coined by Weaveworks in a popular article from August 2017. The problem it intends to solve was how to efficiently and safely deploy a Kubernetes application. The main tenants of this philosophy are:
directly from Weaveworks
The reason why GitOps is especially suited to deploy cloud-native applications is that Kubernetes follows the same declarative way of doing things:
When you understand the concept, you can apply the GitOps way not only to Kubernetes application but to anythings described with code, for example, code infrastructure.
Very often your pipeline is triggered by a change in code (if not, it really should!), so it’s in fact the same starting point as GitOps. Your final pipeline step then run a command like kubectl apply
. You so run an imperative command to reach the desired state.
In GitOps, you won’t do this: it’s an external tool that detects the drift in your Git repository and will run these commands for you. You can think of it as a “pulling” way of doing things.
Let’s look into these tools.
The most commonly used tools are Flux from Weaveworks and ArgoCD. You may find extensive comparisons of both tools but to sum it up:
In this article, we will look to implement a GitOps model using ArgoCD.
#gitops #code #argo-cd #kubernetes #cloud #github