English · IndiaLog in
Rackwave Technologies
Request quote Free consultation
CloudUpdated 25 Nov 2026

What Is GitOps? Principles, Tools and Workflow

A clear guide to GitOps principles, workflow, tools and adoption steps.

Written by David Chen
  • Published25 Nov 2026
  • Read time7 min
  • Length1,368 words
Share this guide

What is GitOps? It is an operating model in which a Git repository is the single source of truth for the desired state of your infrastructure and applications, and an automated agent continuously makes the live environment match what Git says. Changes are made by pull request, reviewed like any code, and applied by software instead of by a person running commands. This guide explains how GitOps works, how it differs from ordinary CI/CD, the main tools, and how to adopt it with Kubernetes and cloud platforms.

Short answer: GitOps stores the declared state of a system in Git and uses an agent inside the environment to pull and apply it, correcting any drift. You get a complete audit trail, easy rollbacks by reverting a commit, and a safer way to give many teams the ability to deploy.

What is GitOps?

The term was popularised by Weaveworks around 2017 and is now supported by a vendor neutral working group. It extends the ideas of infrastructure as code and DevOps with two principles: the desired state is declarative and versioned in Git, and approved changes are applied automatically and continuously. The Git article on Wikipedia explains the version control system on which it depends.

The four GitOps principles

PrincipleMeaningBenefit
DeclarativeThe whole system is described as the state you wantClear, reviewable intent
Versioned and immutableDesired state lives in Git with full historyAudit trail and simple rollback
Pulled automaticallyAgents pull approved changes from GitFewer credentials leave the cluster
Continuously reconciledAgents detect and correct driftEnvironments stay as declared

How GitOps works

Diagram of GitOps showing a pull request updating Git and an agent reconciling the cluster to match
Figure 1. A merged pull request changes Git, and an agent in the cluster reconciles the environment to match.
  1. Change the desired state. A developer opens a pull request that edits manifests, for example to use a new image version.
  2. Review and test. Colleagues review the change and automated checks validate it.
  3. Merge. The merge into the main branch is the approval. Git now holds the new desired state.
  4. The agent notices. A controller such as Argo CD or Flux sees that Git and the cluster differ.
  5. Reconcile. The agent applies the change and reports health and sync status.
  6. Correct drift. If someone changes the cluster by hand, the agent reverts it or raises an alert.
  7. Roll back. To undo a release, revert the commit and the agent restores the previous state.

GitOps compared with traditional CI/CD

AspectPush based CI/CDGitOps
How changes reach the clusterPipeline runs commands against the clusterAgent inside the cluster pulls from Git
CredentialsPipeline needs cluster accessCluster reaches out, fewer exposed secrets
Drift handlingNot detected after deploymentDetected and corrected continuously
Source of truthPipeline scripts and the live clusterGit repository
RollbackRe-run an earlier pipelineRevert a commit

GitOps does not replace CI. A continuous integration pipeline still builds and tests the application and publishes an image. GitOps takes over at the delivery step, deciding what version runs where. See what is CI/CD.

ToolNotes
Argo CDVisual interface, application sets and strong multi cluster support
FluxLightweight controllers built on Kubernetes primitives
Helm and KustomizePackage and customise manifests for each environment
Terraform with a pipelineApplies the GitOps approach to cloud resources. See what is Terraform
Sealed Secrets and external secrets operatorsKeep secrets safe while still using Git

Repository structure that scales

  • Keep application source code and deployment configuration in separate repositories so each can change at its own pace.
  • Use one folder or branch per environment, with shared bases and small overlays for differences.
  • Protect the main branch and require review for production folders.
  • Never commit plain text secrets. Use sealed or externally managed secrets.
  • Use clear commit messages, because Git history is now your deployment history.

Benefits of GitOps

  • Every change is traceable to a person, a review and a commit.
  • Rollback is fast and reliable because earlier states are stored.
  • Developers deploy using tools they already know, without cluster credentials.
  • Recovery is simpler: point a new cluster at the repository and it rebuilds. See what is disaster recovery.
  • Security improves because access to production is through reviewed changes. See what is DevSecOps.

Common GitOps mistakes

  • Allowing engineers to keep changing the cluster by hand, which fights the agent.
  • Mixing application code and environment configuration in a single, noisy repository.
  • Committing secrets to Git.
  • Skipping validation, so a typo in a manifest reaches production.
  • Using GitOps for tasks that are not declarative, such as one off data migrations.

How to adopt GitOps step by step

  1. Start with Kubernetes. GitOps fits clusters naturally. See what is Kubernetes.
  2. Declare one application. Put its manifests or Helm values in a configuration repository.
  3. Install an agent. Deploy Argo CD or Flux and connect it to that repository.
  4. Enable automatic sync for non-production first. Observe behaviour before extending to production.
  5. Add checks. Validate manifests and run policy checks on every pull request.
  6. Introduce approvals for production. Use code owners and required reviewers.
  7. Monitor sync health. Alert when an application is out of sync. See what is observability.

Our DevOps service designs GitOps repositories and delivery pipelines, and our cloud migration service lands workloads on platforms that are ready for them.

Security and compliance with GitOps

ConcernHow GitOps helpsWhat you still need
Who changed productionEvery change is a reviewed commit with an authorBranch protection and signed commits
Least privilegeEngineers need Git access, not cluster administrator rightsRole based access in the agent and the cluster
Audit evidenceGit history and pull request approvals form the recordRetention of that history for the required period
SecretsEncrypted secrets can live safely beside manifestsA tested process for key rotation
PolicyPolicy checks run on every pull request. See what is infrastructure as codeClear ownership of policy rules

For regulated industries this is a significant advantage. An auditor asking who approved a production change can be shown a pull request instead of a spreadsheet, and the same history proves the environment was running exactly the approved configuration at any past date.

Multi cluster and multi environment delivery

GitOps scales naturally across many clusters. A single repository can describe a base application and small overlays for development, staging and each production region. An agent in each cluster pulls only the folder meant for it. Promotion between environments becomes a pull request that copies a version from one folder to the next, which makes it easy to prove that what ran in staging is what reaches production. This is also useful for organisations that follow the approach in what is multi-cloud, because the same repository structure works on any cloud that runs Kubernetes.

A worked example: ten teams, one platform

A company has ten product teams deploying to a shared Kubernetes platform. Each team used to run its own scripts with cluster administrator rights, and a single wrong command once removed a production namespace. The platform team introduces GitOps. Each team owns a folder in a configuration repository, and an Argo CD agent applies only that folder to that team namespace.

Releases become pull requests that include the new image tag. Reviews take minutes and automated checks catch misspelled fields before merge. When a bad release causes errors, the team reverts one commit and service is restored in about two minutes. The platform team no longer hands out administrator rights, and auditors can see who approved every production change. The new discipline took a month to settle, mainly because engineers had to stop fixing things directly in the cluster.

Key takeaways

  • GitOps makes Git the source of truth and uses agents to keep environments in sync.
  • Changes happen by reviewed pull request and rollback means reverting a commit.
  • Pull based delivery reduces exposed credentials and corrects drift automatically.
  • It complements CI, which still builds and tests the software.
  • Keep secrets out of Git and stop manual cluster changes.

Quick glossary

TermMeaning
ReconciliationContinually making actual state match desired state
DriftLive state that differs from what Git declares
OverlayEnvironment specific changes layered on a shared base
Argo CDA popular GitOps controller for Kubernetes
ManifestA file declaring a Kubernetes resource

Read next: What Is Container Orchestration? Kubernetes and Beyond · What Is a Service Mesh? Istio, Linkerd and How It Works · What Is Cloud Security? Shared Responsibility and Controls

Frequently asked questions

What is GitOps in simple terms?

GitOps means Git holds the desired state of your systems and software automatically keeps the real environment matching it. You change production by merging a pull request.

What is the difference between GitOps and DevOps?

DevOps is a broad culture and set of practices. GitOps is a specific way of applying them, using Git as the source of truth and automated reconciliation for delivery.

Is GitOps only for Kubernetes?

It is most common with Kubernetes, but the principles also apply to cloud infrastructure and other declarative systems.

What is the difference between Argo CD and Flux?

Both are GitOps controllers. Argo CD offers a rich interface and application management, while Flux is lightweight and composed of small controllers. Either is a sound choice.

How do secrets work in GitOps?

Plain secrets must never be committed. Teams use encrypted secrets that only the cluster can decrypt, or reference an external secrets manager.

Does GitOps replace CI/CD?

No. CI still builds and tests code and publishes artefacts. GitOps handles the delivery and keeps environments in sync.

How does rollback work with GitOps?

You revert the commit that introduced the problem. The agent sees the change and restores the previous state automatically.

What are the risks of GitOps?

Poor repository structure, secrets in Git and manual changes that fight the agent. Clear conventions and training prevent most problems.

Was this guide helpful?Your answer helps us decide what to improve. It is not linked to you.

#what is gitops#gitops principles#argo cd vs flux#gitops workflow#gitops vs devops

About the author

David Chen

Cloud & DevOps Consultant

David has spent his career building and migrating infrastructure across AWS, Azure, and GCP, with a focus on the DevOps practices that make cloud migrations actually stick rather than reverting to old habits six months later.

Cloud & DevOps Infrastructure

Ready to put AI and data to work?

Book a free consultation and leave with a plan, not a pitch.

Get a free consultationRequest quote