GitOps
Also known as:
1. Overview
GitOps is an operational framework that takes DevOps best practices used for application development such as version control, collaboration, compliance, and CI/CD, and applies them to infrastructure automation [1]. It is a set of practices for managing infrastructure and application configurations to expand upon existing processes and improve the application lifecycle [2]. At its core, GitOps is code-based infrastructure and operational procedures that rely on Git as a source control system. It’s an evolution of Infrastructure as Code (IaC) and a DevOps best practice that leverages Git as the single source of truth, and control mechanism for creating, updating, and deleting system architecture [3].
GitOps ensures that a system’s cloud infrastructure is immediately reproducible based on the state of a Git repository. Pull requests modify the state of the Git repository. Once approved and merged, the pull requests will automatically reconfigure and sync the live infrastructure to the state of the repository. This live syncing pull request workflow is the core essence of GitOps [3].
2. Core Principles
The OpenGitOps project, a CNCF sandbox project, defines four core principles for GitOps:
-
Declarative: A system managed by GitOps must have its desired state expressed declaratively [7]. This means that the configuration is specified in a way that describes the what rather than the how. For example, a declarative configuration might specify that there should be five instances of a web server running, but it doesn’t specify the commands to start those instances.
-
Versioned and Immutable: The desired state of a GitOps-managed system is stored in a Git repository, which serves as the single source of truth. All changes to the desired state are made through commits to the Git repository, providing a complete audit trail of all changes. The state is immutable in the sense that direct changes to the live system are not allowed; all changes must go through the Git repository [8].
-
Pulled Automatically: The desired state is pulled automatically by agents running in the cluster. There is no need to manually push changes to the cluster. This ensures that the cluster is always in sync with the desired state defined in the Git repository [8].
-
Continuously Reconciled: Software agents continuously observe the actual system state and attempt to apply the desired state. If there is any drift between the actual state and the desired state, the agents will automatically reconcile the system to match the desired state. The agents also alert on any divergence between the actual and desired states [7].
3. Key Practices
GitOps is put into practice through a set of key practices that build upon its core principles. These practices ensure that the Git repository is the central hub for all infrastructure and application configuration, and that all changes are made in a controlled, auditable, and automated manner.
Git as the Single Source of Truth
The most fundamental practice of GitOps is using a Git repository as the single source of truth for the desired state of the system. This includes not only application code but also infrastructure and application configuration. By having everything in Git, teams can leverage the power of version control to track changes, revert to previous states, and collaborate effectively [1, 2, 3].
Merge/Pull Requests for Change Management
All changes to the desired state of the system are made through merge requests (MRs) or pull requests (PRs). This provides a formal process for proposing, reviewing, and approving changes. It also creates a clear audit trail of who made what change, when, and why. This collaborative approach to change management helps to improve the quality and reliability of the system [1, 3].
CI/CD for Automation
Continuous integration and continuous delivery (CI/CD) pipelines are used to automate the process of applying changes to the system. When a merge request is approved and merged, a CI/CD pipeline is triggered automatically. The pipeline builds the necessary artifacts, such as container images, and then deploys them to the target environment. This automation helps to reduce the risk of human error and to ensure that changes are applied consistently [1, 2].
Continuous Reconciliation with Agents
A key component of a GitOps workflow is the use of software agents, often called operators, that run within the target environment (e.g., a Kubernetes cluster). These agents continuously monitor the actual state of the system and compare it with the desired state defined in the Git repository. If there is any drift, the agents automatically reconcile the system to match the desired state. This ensures that the system is always in the state that is defined in Git, even if there are manual changes or failures [3].
4. Application Context
GitOps is particularly well-suited for managing modern, cloud-native applications and infrastructure. Its principles and practices align perfectly with the dynamic and declarative nature of containerized environments and microservices architectures. While it can be adapted to other contexts, its primary application is in environments where infrastructure is treated as code and can be managed through declarative configuration files.
Kubernetes and Container Orchestration
GitOps is most commonly used with Kubernetes, the leading container orchestration platform. Kubernetes is a declarative system, meaning that users define the desired state of their applications and services in YAML files. This declarative nature makes it a perfect match for GitOps, where the desired state is stored in a Git repository. The GitOps agent, running in the Kubernetes cluster, can then continuously reconcile the cluster’s state with the state defined in Git [3].
Cloud-Native and Microservices
The rise of cloud-native computing and microservices architectures has led to an increase in the complexity of application deployments. Managing a large number of small, independent services can be challenging. GitOps provides a scalable and manageable way to handle this complexity. By using Git as a single source of truth for all service configurations, teams can ensure consistency and reliability across their entire application landscape [2].
Multi-Cloud and Hybrid Environments
Organizations are increasingly adopting multi-cloud and hybrid cloud strategies. Managing infrastructure and applications across multiple cloud providers and on-premises data centers can be a significant challenge. GitOps can help to address this challenge by providing a unified workflow for managing all environments. By using a single Git repository to manage the configuration for all environments, teams can ensure consistency and portability across clouds [1].
5. Implementation
Implementing GitOps involves setting up a workflow that connects a Git repository to a target environment, such as a Kubernetes cluster. This workflow typically consists of a few key components:
-
A Git Repository: This is the single source of truth for the desired state of the system. It contains all the configuration files, such as Kubernetes manifests or Helm charts, that define the infrastructure and applications.
-
A CI/CD Pipeline: This pipeline is responsible for automating the process of applying changes to the system. It is triggered by commits to the Git repository and can be used to build container images, run tests, and deploy applications.
-
A GitOps Agent: This is a software agent that runs in the target environment and is responsible for continuously reconciling the actual state of the system with the desired state defined in the Git repository. Popular GitOps agents include Argo CD and Flux.
A typical GitOps workflow looks like this:
- A developer makes a change to a configuration file in the Git repository and opens a pull request.
- The pull request is reviewed and approved by other team members.
- Once the pull request is merged, a CI/CD pipeline is triggered.
- The CI pipeline builds any necessary artifacts, such as container images, and pushes them to a registry.
- The CD pipeline updates the configuration in the Git repository to use the new container image.
- The GitOps agent, running in the target environment, detects the change in the Git repository and pulls the updated configuration.
- The agent then applies the updated configuration to the system, bringing it into the desired state.
6. Evidence & Impact
Numerous organizations have reported significant benefits from adopting GitOps. These benefits typically revolve around increased deployment frequency, improved stability and reliability, and enhanced developer productivity. For example, State Farm integrated GitOps into their CI/CD pipeline and saw a significant reduction in the time it took to deploy new applications [6]. Dataiku also reported that integrating GitOps with their projects significantly improved their deployment process by adding automation, consistency, and control [12]. Similarly, a leading media organization modernized their CI/CD at scale with Argo and GitOps, cutting failure rates and speeding up deployments across 850 applications [14].
The benefits of GitOps are not limited to large enterprises. Smaller organizations and startups have also found success with GitOps. For example, a case study on the Confluent documentation shows how a small team can manage Kafka Connect workers and connectors on Kubernetes using a GitOps approach, resulting in a scalable and fault-tolerant system [4].
The impact of GitOps can be summarized as follows:
- Increased Deployment Frequency: By automating the deployment process, GitOps enables teams to deploy new features and bug fixes more frequently. This allows organizations to respond more quickly to customer feedback and market changes.
- Improved Stability and Reliability: The use of a single source of truth and a declarative approach to configuration management helps to improve the stability and reliability of the system. All changes are tracked and can be easily reverted, which reduces the risk of production outages.
- Enhanced Developer Productivity: GitOps empowers developers to manage their own infrastructure and deployments, which can lead to a significant increase in productivity. Developers can use the same tools and workflows that they use for application development, which reduces the learning curve and allows them to focus on writing code.
- Improved Security and Compliance: The audit trail provided by Git makes it easy to track all changes to the system, which can be invaluable for security and compliance purposes. All changes are reviewed and approved before they are applied, which helps to reduce the risk of unauthorized changes.
7. Cognitive Era Considerations
The cognitive era, characterized by the rise of artificial intelligence (AI) and machine learning (ML), is poised to have a profound impact on GitOps. The integration of AI into the GitOps workflow, often referred to as AIOps, has the potential to further automate and optimize the process of managing infrastructure and applications. By combining the declarative nature of GitOps with the predictive and analytical capabilities of AI, organizations can create self-managing and self-healing systems that are more resilient, efficient, and secure.
One of the key ways that AI can enhance GitOps is by providing intelligent insights into the health and performance of the system. AI-powered monitoring tools can analyze vast amounts of data from various sources, such as logs, metrics, and traces, to detect anomalies, predict failures, and identify the root cause of problems. This information can then be used to automatically trigger remediation actions, such as rolling back a change or scaling up a service, without any human intervention [15].
Another area where AI can play a significant role is in the optimization of resource utilization. AI algorithms can analyze historical usage patterns to predict future demand and automatically adjust resource allocation to meet that demand. This can help to reduce costs and improve the efficiency of the system. For example, an AI-powered GitOps system could automatically scale down a service during off-peak hours to save money and then scale it back up when demand increases [16].
Furthermore, AI can be used to enhance the security of the GitOps workflow. AI-powered security tools can analyze code and configuration files for potential vulnerabilities and automatically flag them for review. They can also monitor the system for suspicious activity and automatically block any unauthorized changes. This can help to protect the system from both internal and external threats [17].
The integration of AI into GitOps is still in its early stages, but it has the potential to revolutionize the way that we manage infrastructure and applications. As AI and ML technologies continue to mature, we can expect to see even more innovative use cases for AIOps emerge. The future of GitOps is likely to be one where intelligent agents work alongside human operators to create a new generation of self-managing and self-healing systems [18].
8. Commons Alignment Assessment (v2.0)
This assessment evaluates the pattern based on the Commons OS v2.0 framework, which focuses on the pattern’s ability to enable resilient collective value creation.
1. Stakeholder Architecture: GitOps primarily defines Rights and Responsibilities for technical stakeholders, such as developers and operations teams, through its structured, auditable workflow. The rights to propose, review, and approve changes to the system are managed via Git, creating a clear architecture for who can alter the system’s state. However, it does not natively extend these rights to non-technical stakeholders like end-users, the community, or the environment, focusing instead on the integrity and management of the technical system.
2. Value Creation Capability: The pattern excels at creating knowledge and resilience value. By treating infrastructure and operations as code, it builds a transparent, version-controlled knowledge base of the system’s entire history. This directly enhances resilience, enabling rapid, reliable rollbacks and system reproduction, which minimizes downtime and ensures operational stability—a foundational capability for any form of subsequent value creation.
3. Resilience & Adaptability: Resilience and adaptability are core strengths of GitOps. The framework is explicitly designed to manage change in a controlled and automated fashion, allowing systems to evolve safely. Its principle of continuous reconciliation, where agents automatically correct any drift from the declared state, ensures the system maintains coherence and self-heals from unexpected changes, making it exceptionally resilient under stress.
4. Ownership Architecture: GitOps defines ownership as stewardship over the system’s desired state. Stakeholders with commit access exercise ownership by taking responsibility for the configuration and operational integrity of the system. This is a powerful form of technical ownership, but it does not address broader ownership concepts like shared equity in the value generated by the system or governance rights for end-users.
5. Design for Autonomy: GitOps is highly compatible with autonomous systems, AI, and DAOs due to its declarative, machine-readable nature. By defining the desired state in Git, it allows automated agents to act with minimal human coordination, pulling changes and ensuring the system conforms to its intended design. This low-coordination-overhead model is fundamental for scaling distributed and autonomous operations.
6. Composability & Interoperability: The pattern is exceptionally composable and serves as a foundational operational layer. It seamlessly integrates with other patterns like Infrastructure as Code, container orchestration (e.g., Kubernetes), and CI/CD pipelines. This allows it to be a core component in building larger, more complex, and highly automated value-creation systems.
7. Fractal Value Creation: The value-creation logic of GitOps is fractal, applying consistently across different scales. The same principles of using a declarative source of truth and automated reconciliation can be used to manage a single application, a complex microservices architecture, or even an entire multi-cloud infrastructure. This ensures that resilience and operational clarity are maintained as the system grows in size and complexity.
Overall Score: 4 (Value Creation Enabler)
Rationale: GitOps is a powerful framework that strongly enables the creation of resilient, adaptable, and auditable technical systems. It provides a robust architecture for managing complexity and change, which are foundational for collective value creation. However, it is primarily a technical and operational pattern and does not inherently address the social, economic, or governance layers of a commons, preventing it from being a complete value creation architecture on its own.
Opportunities for Improvement:
- Integrate with governance patterns to extend change approval rights to a broader set of stakeholders beyond the technical team.
- Develop mechanisms to link operational metrics (e.g., system uptime, deployment frequency) to broader value creation dashboards accessible to all stakeholders.
- Explore how Git-based audit trails could be used to create transparent reports on the system’s environmental or social impact, not just its technical state.
9. Resources & References
[1] GitLab. “What is GitOps?” https://about.gitlab.com/topics/gitops/
[2] Red Hat. “What is GitOps?” https://www.redhat.com/en/topics/devops/what-is-gitops
| [3] Atlassian. “What Is GitOps? | Atlassian Git Tutorial.” https://www.atlassian.com/git/tutorials/gitops |
[4] Confluent. “Case Study: Kafka Connect management with GitOps.” https://docs.confluent.io/platform/7.5/tutorials/streaming-ops/case-studies/connector-management.html
[5] Homecooked. “GitOps on DigitalOcean Kubernetes services, a case study.” https://www.homecooked.nl/blog/2021-12-29-gitops/
[6] Incredibuild. “GitOps unveiled: Transforming your CI/CD pipeline with Git…” https://www.incredibuild.com/blog/gitops-unveiled-transforming-your-ci-cd-pipeline-with-git-based-operations
[7] OpenGitOps. “Home.” https://opengitops.dev/
[8] The New Stack. “4 Core Principles of GitOps.” https://thenewstack.io/4-core-principles-of-gitops/
[9] Flexera. “Understanding GitOps: Principles, workflow, and…” https://www.flexera.com/blog/finops/understanding-gitops-principles-workflows-deployment-types/
[10] Datadog. “Understanding GitOps: key principles and components for…” https://www.datadoghq.com/blog/gitops-principles-and-components/
[11] CNCF. “GitOps 101: What’s it all about?” https://www.cncf.io/blog/2021/09/28/gitops-101-whats-it-all-about/
[12] Dataiku. “Implementing GitOps for Dataiku: A Success Story.” https://www.dataiku.com/stories/blog/implementing-gitops-for-dataiku
[13] Red Hat. “Red Hat OpenShift GitOps Wins DevOps Dozen Award.” https://www.redhat.com/en/blog/red-hat-openshift-gitops-wins-devops-dozen-award
[14] Optimum Partners. “How We Modernized CI/CD at Scale with Argo and GitOps.” https://optimumpartners.com/success_stories/how-we-modernized-ci-cd-across-850-applications-with-gitops-and-argo/
[15] Forbes. “How AIOps Redefines Cloud Provisioning By Embracing GitOps…” https://www.forbes.com/councils/forbestechcouncil/2025/01/02/how-aiops-redefines-cloud-provisioning-by-embracing-gitops-principles-and-security-standards/
[16] Credo Systemz. “From GitOps to AIOps: Automating Cloud Infrastructure by 2026.” https://www.credosystemz.com/blog/gitops-to-aiops-automating-cloud-infrastructure-by-2026/
[17] Technorizen. “From Git Ops to AIOps: The New DevOps Evolution Explained.” https://technorizen.com/from-git-ops-to-aiops-the-new-devops-evolution-explained/
[18] Red Hat. “Do you still need GitOps in the era of gen AI?” https://www.redhat.com/en/blog/do-you-still-need-gitops-era-gen-ai