GitOps is a paradigm for managing infrastructure and application deployments where the desired system state is declared in a Git repository. Automated operators, like Flux or Argo CD, continuously compare this declared state in Git against the actual state in the runtime environment (e.g., a Kubernetes cluster). When a drift is detected, the operator automatically applies changes to reconcile the environments, enforcing the Git state as the authoritative source. This creates a closed-loop control system, centralizing all changes—including rollbacks—through Git commits and pull requests.
Glossary
GitOps

What is GitOps?
GitOps is an operational framework that uses Git as a single source of truth for declarative infrastructure and applications, with automated processes to reconcile the live state with the desired state defined in Git.
The framework enforces immutable infrastructure and declarative configuration, treating infrastructure as code. A core component is the reconciliation loop, which continuously observes and corrects state deviations. This provides a clear audit trail via Git history, enables role-based access control through Git permissions, and facilitates canary deployments and blue-green deployments through Git branch strategies. GitOps is foundational for building self-healing software systems by automating recovery to a known-good state defined in version control.
Core Principles of GitOps
GitOps is an operational framework that uses Git as a single source of truth for declarative infrastructure and applications, with automated processes to reconcile the live state with the desired state defined in Git. Its core principles define the foundation for building resilient, self-healing software ecosystems.
Declarative Configuration
The entire desired state of the system—including applications, infrastructure, and policies—is declaratively described in files (e.g., YAML, JSON) stored in a Git repository. This is the single source of truth. Instead of imperative commands ("run this, then that"), the system specifies what the end-state should be, not how to achieve it. This enables version control, audit trails, and reproducibility for the entire operational environment.
Versioned & Immutable Truth
Git provides the canonical, immutable version history for the system's desired state. Every change is a commit with a unique hash, author, timestamp, and message. This creates a complete audit trail for compliance and enables powerful operations:
- Rollback: Revert to any previous known-good state instantly.
- Blame/Investigation: Trace any configuration change to its origin.
- Peer Review: All changes flow through pull requests, enforcing code review and collaboration before deployment.
Automated State Reconciliation
A dedicated controller agent (e.g., Flux, Argo CD) runs in the target environment. It continuously:
- Pulls the desired state from the Git repository.
- Observes the actual, live state of the system (e.g., in a Kubernetes cluster).
- Compares the two states.
- Takes action to reconcile any drift, automatically applying changes to make the live state match the declared state in Git. This creates a self-healing loop that corrects unauthorized changes or failures without human intervention.
Agent-Based Pull & Deployment
The pull-based model is a key security and stability differentiator. The deployment agent inside the cluster pulls updates from the Git repo, rather than an external CI/CD server pushing changes. This offers critical advantages:
- Enhanced Security: The cluster does not need inbound write access; it fetches updates using its own credentials.
- Improved Stability: The agent only applies changes it has successfully fetched and validated, acting as a circuit breaker against faulty deployment pipelines.
- Environment Consistency: The same agent and process work identically across development, staging, and production.
Closed-Loop Feedback & Observability
The system provides continuous feedback on the reconciliation process. The controller monitors application health and emits events and metrics, answering key questions:
- Is the system in sync? (Sync status)
- Is the deployed application healthy? (Health status)
- What was deployed, when, and by whom? (Audit log) This observability is typically surfaced in dashboards (like the Argo CD UI) and integrated into monitoring systems, making the state of deployments and their compliance with Git explicit and verifiable.
The GitOps Operator Pattern
This is the primary implementation pattern in Kubernetes. A custom controller (the "operator") is installed in the cluster. It watches for changes to Custom Resources (CRs) in the Kubernetes API. These CRs, which are also stored in Git, declaratively describe an application's source (Git repo, Helm chart) and destination (target cluster/namespace). The operator then manages the full lifecycle—deployment, health monitoring, and state reconciliation—of that application based on the CR's specification. This pattern extends Kubernetes' native declarative API to manage complex applications.
How GitOps Works: The Reconciliation Loop
The reconciliation loop is the fundamental control mechanism of GitOps, continuously aligning the live state of a system with its declared desired state stored in Git.
The reconciliation loop is a continuous control process that observes the actual state of a cluster and compares it to the declared desired state stored in a Git repository. An automated operator or controller detects any divergence (drift) between these states. This declarative approach treats infrastructure and application configuration as immutable code, with Git serving as the single source of truth for the entire system's intended configuration.
Upon detecting drift, the controller automatically executes corrective actions—such as applying Kubernetes manifests—to converge the live environment back to the declared state. This creates a self-healing system that enforces consistency without manual intervention. The loop's frequency is configurable, enabling either continuous polling or event-driven reconciliation via webhooks, ensuring rapid response to both unintended changes and intentional deployments.
Push vs. Pull Deployment Models
A comparison of the two fundamental deployment models used in GitOps, contrasting the control flow, security posture, and operational characteristics of each approach.
| Architectural Feature | Push Model (Imperative) | Pull Model (Declarative/GitOps) |
|---|---|---|
Control Flow Direction | Central CI/CD server pushes changes to environments | Agents within each environment pull changes from source |
Primary Security Model | Outbound credentials from CI server to clusters | Inbound, read-only credentials from clusters to source |
Network Access Requirement | CI/CD server requires network egress to all target clusters | Clusters require network ingress only to source repository |
State Reconciliation | One-time imperative command execution | Continuous declarative reconciliation loop |
Drift Detection & Correction | Manual or scripted; reactive | Automatic and continuous; proactive |
Audit Trail Source | CI/CD server logs (can be ephemeral) | Git commit history (immutable, single source of truth) |
Permission Scope for Deployment | CI server identity has broad, push-based write access | Cluster agent identity has narrow, pull-based read-only access to source |
Failure Recovery Mechanism | Manual rollback or re-run of CI/CD pipeline | Automatic reversion via Git revert or rollback commit |
Typical Operational Overhead | High (managing server, credentials, network rules) | Low (agent per cluster, minimal central management) |
Compliance & Governance Alignment | Moderate (depends on CI/CD server controls) | High (all changes are Git commits, enabling policy-as-code) |
Primary GitOps Tools and Platforms
GitOps is implemented through a suite of specialized tools that automate the reconciliation loop between a Git repository (the desired state) and a live environment. These platforms provide the core operators, controllers, and dashboards necessary for declarative, auditable, and self-healing infrastructure management.
Frequently Asked Questions
GitOps is an operational framework that uses Git as a single source of truth for declarative infrastructure and applications. These questions address its core principles, implementation, and relationship to self-healing systems.
GitOps is an operational framework that uses Git repositories as the single source of truth for declarative infrastructure and application configurations. It works through an automated reconciliation loop: a dedicated controller (e.g., Flux, Argo CD) continuously monitors the Git repository and the live state of the system (e.g., a Kubernetes cluster). When a discrepancy is detected—such as a new commit to the main branch—the controller automatically applies the changes defined in Git to the live environment, converging the actual state to the declared desired state. This creates a closed-loop control system where all changes are versioned, auditable, and applied via pull requests.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
GitOps is not a standalone tool but an operational framework built upon a constellation of related technologies and patterns. Understanding these adjacent concepts is crucial for implementing a robust, self-healing software system.
Reconciliation Loop
The reconciliation loop is the core control mechanism in GitOps and declarative systems like Kubernetes. It is a continuous process where a controller observes the actual, live state of a system (e.g., a Kubernetes cluster) and compares it to the declared desired state stored in Git. If a drift is detected, the controller automatically takes corrective actions—such as creating, updating, or deleting resources—to converge the live state with the declared state. This loop enables the self-healing property central to GitOps, as it automatically corrects configuration errors, manual changes, or failed deployments without human intervention.
Immutable Infrastructure
Immutable infrastructure is a deployment model where servers, containers, or application artifacts are never modified in-place after they are deployed. Instead of patching or updating a running instance, changes are made by building a new, versioned artifact (like a container image) from the source of truth in Git and then replacing the entire old instance with the new one. This pattern is foundational to GitOps because:
- It guarantees that the deployed state exactly matches the version-controlled source.
- It eliminates configuration drift caused by ad-hoc server changes.
- It enables rollbacks by simply redeploying a previous, known-good artifact version.
- It works seamlessly with the reconciliation loop to replace non-conforming resources.
Declarative Configuration
Declarative configuration is a paradigm where you define the desired end state of a system (the what), rather than writing step-by-step instructions to achieve it (the how). In GitOps, all infrastructure and application configurations—Kubernetes manifests, Helm charts, Terraform HCL—are written declaratively and stored in Git. Key characteristics include:
- Idempotency: Applying the same configuration multiple times yields the same result.
- Statefulness: The system's controller is responsible for figuring out the operations needed to reach the declared state.
- Version Control Friendliness: Declarative files are ideal for diffing, reviewing, and rolling back in Git.
This contrasts with imperative commands (e.g.,
kubectl run), which are instructions for a one-time action and are not suitable as a source of truth.
Infrastructure as Code (IaC)
Infrastructure as Code is the practice of managing and provisioning computing infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. GitOps can be viewed as an evolution of IaC principles applied to operations and deployment. While traditional IaC tools (like Terraform, Ansible, Pulumi) define infrastructure, GitOps adds a rigorous operational layer:
- Git as the Single Source of Truth: All IaC definitions must be in a Git repository.
- Automated Reconciliation: The IaC is not just applied manually; a controller automatically applies it and enforces it continuously.
- Extended Scope: GitOps applies IaC principles not just to servers and networks, but to the full application deployment (Kubernetes resources, service meshes, etc.).
Continuous Delivery (CD)
Continuous Delivery is a software engineering approach where teams produce software in short cycles, ensuring that the software can be reliably released at any time. GitOps operationalizes and automates the deployment aspect of a CD pipeline. In a GitOps workflow:
- The CD pipeline's output is a declarative configuration change committed to Git (e.g., updating a container image tag in a YAML file).
- The Git commit acts as the release trigger. A separate, automated process (the GitOps operator) detects this change and deploys it to the target environments.
- This decouples the build/test stages (CI) from the deploy/reconcile stage (CD), making the deployment process auditable, reversible, and consistent across all environments (dev, staging, production).
Canary Deployment
A canary deployment is a release strategy where a new version of an application is deployed to a small, selected subset of users or servers (the "canary") before rolling it out to the entire infrastructure. GitOps tools and patterns provide a structured, declarative way to manage canary releases:
- Canary configuration (traffic split rules, pod selectors) is defined declaratively in Git.
- A GitOps controller (like Flagger with Flux) watches for new image versions in Git.
- It automatically orchestrates the canary rollout, gradually shifting traffic while analyzing key metrics for success (latency, error rate).
- Based on the metrics, the controller can automatically promote the canary to a full rollout or roll it back—all by updating the desired state in Git. This integrates progressive delivery directly into the GitOps reconciliation cycle.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us