How GitOps Works

Learn the general pattern behind every application of GitOps.

The GitOps pattern

Thinking of GitOps as a pattern is the best way to understand how the approach works. Many tools are available for putting GitOps practices into place. However, each of these tools loosely follows a similar overarching pattern to apply the GitOps principles. Once you learn the pattern, you can quickly rationalize how any tool uses GitOps to manage changes, deployments, and system operations.

Describe the system

In GitOps, a description of every important system component is created and stored within a configuration file. This collection of configuration data, which describes the entire system, is referred to as the desired state. This state represents the condition we expect the system to be in at that exact time. It might describe conditions within the system, like how many nodes are in a Kubernetes cluster, what specific docker image is running in a Kubernetes pod, or how many replicas of that pod are inside the cluster. Anything description of how our system is expected to behave at runtime is part of the desired state.

Get hands-on with 1400+ tech skills courses.