Skip to content

/glossary/argo-cd/gitops

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

AspectCI pipeline pushesGitOps agent pulls
Who applies changesa CI job with cluster credentialsan agent running in the cluster
Credentials outside the clusteryes, in the CI systemno, only read access to Git
Drift (manual changes)stays until the next deploydetected and optionally reverted
Rollbackre-run an older pipelinegit revert
Audit trailpipeline logsGit history

With Argo CD

An Argo CD Application points at a path in a repository and a destination cluster:

yaml
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 cluster

CI still builds and tests images; the final step updates an image tag in the deploy repository, and Argo CD rolls it out.

Sources