What is GitOps?
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- Argo CD
- versions
- Argo CD 2.x, Argo CD 3.x
- os
- any
GitOps is a way to run deployments in which a Git repository holds the desired state, for example Kubernetes manifests or Helm values, and a software agent inside the target environment keeps pulling that state and applying it. Changes go through commits and pull requests; nobody runs kubectl apply by hand. The OpenGitOps project defines four principles: declarative, versioned and immutable, pulled automatically, continuously reconciled.
Push-based CI vs GitOps
| Aspect | CI pipeline pushes | GitOps agent pulls |
|---|---|---|
| Who applies changes | a CI job with cluster credentials | an agent running in the cluster |
| Credentials outside the cluster | yes, in the CI system | no, only read access to Git |
| Drift (manual changes) | stays until the next deploy | detected and optionally reverted |
| Rollback | re-run an older pipeline | git revert |
| Audit trail | pipeline logs | Git history |
With Argo CD
An Argo CD Application points at a path in a repository and a destination cluster:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: web
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/example/deploy.git
targetRevision: main
path: apps/web
destination:
server: https://kubernetes.default.svc
namespace: web
syncPolicy:
automated:
prune: true # delete resources removed from Git
selfHeal: true # undo manual changes in the clusterCI still builds and tests images; the final step updates an image tag in the deploy repository, and Argo CD rolls it out.
Sources
Related pages
compare · gitlab-ciGitHub Actions vs GitLab CI/CD: concepts and syntax side by sideGitHub Actions runs event-triggered workflows built from reusable actions; GitLab CI uses one .gitlab-ci.yml with stages, rules and includes. How they map.commands · kubernetesGenerate Kubernetes YAML with kubectl create --dry-run=client -o yamlkubectl create deployment, service, configmap or secret with --dry-run=client -o yaml prints a ready manifest without a cluster. Save it with > file.yaml.glossary · terraformWhat is Terraform state?Terraform state is the JSON record that maps each resource address in your code to the real object it manages and its last known attributes: terraform.tfstate.