What is GitOps?
GitOps is a way of operating infrastructure and applications where the desired state is declared in a Git repository and an automated agent keeps the running system in line with it. Changes go through commits and pull requests, so every change is reviewed, versioned and can be reversed with a Git revert.
How it works
The OpenGitOps project at the CNCF defines four principles. The desired state is declarative, it is versioned and immutable in a store such as Git, software agents pull it automatically, and those agents continuously reconcile the running system with it.
In practice, a controller such as Argo CD or Flux runs inside the Kubernetes cluster and watches a repository of manifests or Helm values. When a commit changes the desired state, the controller applies it. When someone changes the cluster by hand, the controller reports the drift and, if configured, reverts it. This pull model means the CI system does not need credentials to the cluster.
Most teams keep application code and deployment configuration in separate repositories, and promote a release by opening a pull request that changes an image tag in the production folder. Secrets need extra tooling, such as Sealed Secrets or the External Secrets Operator, because plain secrets should never be committed to Git.
Examples
Promotion by pull request
A release moves from staging to production when someone merges a pull request that updates the image tag in the production values file.
Rollback with git revert
A bad release goes out. The on-call engineer reverts the commit, and the controller rolls the cluster back to the previous state.
Many clusters from one repository
A platform team manages add-ons for every cluster from one repository, with a folder per cluster and shared defaults. Preview environments can follow the same pattern per pull request.
How Qovery does it
Qovery deploys from Git. It builds the container image from your repository, pushes it to a registry in your cloud account and deploys it on Kubernetes in your own cloud account, in one place and without a separate CD pipeline. Qovery never hosts the application.
Every change, whether a person or an AI agent made it, is attributed in the audit log. Agents act only within what their API Policy Token allows, and each pull request can get its own preview environment.
Go deeper
- GitOps vs. DevOps: how can they work together?The long guide: where GitOps fits inside a DevOps practice.
- Qovery vs Argo CDRunning a GitOps controller yourself or using a platform.
- Top GitOps tools for KubernetesTwelve options compared, and what changes when agents write the YAML.
- CI/CD and builds topic hubGitOps with Argo CD and Flux, build speed and preview environments.