XenonStack

DevOps

XenonStack Blog GitOps Continuous Delivery: Workflow, Argo CD and Flux

and | Published | Updated

GitOps Continuous Delivery: Workflow, Argo CD and Flux
28:32

Key takeaway

  • GitOps continuous delivery explained: push vs pull deployment, Argo CD vs Flux, ML pipelines, security controls and an adoption path for Kubernetes teams.

What is GitOps and how does it differ from a normal CI/CD pipeline?

GitOps is a way of running continuous delivery in which the desired state of a system lives in Git and software agents keep the running system matching it. According to OpenGitOps, a GitOps system has its desired state expressed declaratively, stored with full version history, pulled automatically by agents and continuously reconciled against the live system.

The difference from a conventional pipeline is who applies the change. In a push pipeline the CI server runs the deployment. In GitOps an agent inside the environment compares Git with reality and closes the gap, so Git becomes the audit record and the rollback source. It sits alongside the wider DevOps process and builds on infrastructure as code, applied to cloud-native applications.

Which four principles define GitOps?

The OpenGitOps principles (version 1.0.0, read 13 November 2026) are the shortest reliable definition. They are a test you can apply to any toolchain that claims to be GitOps.

PrincipleWhat it means in practiceWhat to check in your setup
DeclarativeThe desired state is described as facts, such as Kubernetes manifests, not as scriptsCan you rebuild an environment from the repository alone?
Versioned and immutableState is stored with enforced versioning and complete historyAre merges reviewed, and is history protected from rewriting?
Pulled automaticallyAgents pull the desired state from the sourceDoes the cluster pull, or does an outside pipeline push into it?
Continuously reconciledAgents observe actual state and try to apply the desired stateWhat happens when someone edits the cluster by hand?

Kubernetes suits this model because its objects are declarative. The Kubernetes documentation describes keeping object configuration files in a directory and applying them with kubectl apply, with kubectl diff to preview changes (Kubernetes docs). GitOps agents automate that loop and add continuous comparison. For the cluster side, see our guide to Kubernetes architecture and components.

Push or pull: which GitOps deployment model should you use?

Both models start the same way: code changes build an image and update a configuration repository. They differ in what applies the change to the cluster.

ModelHow it worksStrengthRisk to manage
Push-basedA CI/CD pipeline applies manifests to the environment after a changeSimple to start, and often needed to provision cloud infrastructureThe pipeline holds deployment credentials, and it only runs on a change, so drift goes unseen unless you monitor for it
Pull-basedAn agent in the environment compares Git with the live state and applies the differenceCredentials stay in the environment, and drift is detected and correctedYou must monitor the agent itself, because delivery stops if it stops

Prefer pull where you can, because it matches the third and fourth OpenGitOps principles. Use push where a tool must create the cluster itself, and keep the credentials of that pipeline narrow. Whichever you choose, alert on failed reconciliation: a silent agent is the same as no deployment.

How does the GitOps workflow run from commit to cluster?

A typical Kubernetes flow separates application code from environment configuration. The steps below describe the pull-based version.

Two-column diagram: left lists pull request, continuous integration, config repository and in-cluster agent; right lists reviewed history, image in registry, declarative manifests and reconcile and report.
  1. A developer opens a pull request against the application repository, and a colleague reviews it.

  2. The merge triggers continuous integration, which tests the code, builds a container image and stores it in a registry.

  3. The new image tag is written to the environment configuration repository, either by a person through a pull request or by an automation step.

  4. The in-cluster agent, such as Argo CD or Flux, detects that the cluster no longer matches the repository.

  5. The agent applies the revised manifests and reports the result. Any manual edit made to the cluster is reported or reverted, depending on configuration.

Build each image once and promote the same image through test and production environments by changing the tag in Git, rather than rebuilding for each stage. This keeps what you tested identical to what you ship.

Video: GitOps tools, pipelines and the Kubernetes operator, from XenonStack.

Argo CD or Flux: which GitOps tool fits your platform?

Both are CNCF graduated projects. The CNCF project pages show Flux graduated on 30 November 2022 and Argo on 6 December 2022 (Flux, Argo). Choose on operating model, not on popularity.

QuestionArgo CDFlux
What is it?A declarative GitOps continuous delivery tool for Kubernetes that runs as a controller and compares live state with Git (docs)A set of controllers, the GitOps Toolkit, with sources, Kustomize, Helm, notification and image automation controllers (docs)
How do you see state?Reports applications as OutOfSync and visualises the differencesReconciles Kustomization and HelmRelease resources, with notifications for alerts
Drift handlingAutomated sync does not revert live changes unless self-heal is enabled; prune is also off by defaultManual changes made with kubectl are reverted by Kustomization reconciliation; the default interval is five minutes
Multi-tenancyRBAC policies and SSO through OIDC, SAML 2.0 and other providersImpersonation of a tenant service account so a tenant repository is not reconciled as cluster-admin
Fits whenYou want a central view of many applications and clustersYou want small composable controllers and registry-driven image updates

Sources: Argo CD automated sync, Flux concepts and Flux security. Helm charts can be deployed by either tool; see what Helm is and how it packages Kubernetes applications.

How do you manage many applications and clusters with GitOps?

Argo CD documents an app-of-apps pattern in which one application creates other applications, so a group of apps can be managed and deployed together (declarative setup). For many clusters, the ApplicationSet controller, bundled with Argo CD since version 2.3, generates applications from a template using list, cluster or Git generators (ApplicationSet docs). Either approach means you maintain a small set of definitions instead of one Helm chart per application.

Keep one repository layout rule: separate application source from environment configuration, and make each environment a directory or branch you can review on its own. Promotion then becomes a reviewed change in Git.

How does GitOps apply to machine learning pipelines?

GitOps controls the deployment of an ML service the same way it controls any workload: the serving manifests, image tags and configuration live in Git. What differs is that a model also depends on data and trained artefacts that are too large for Git. Tools such as DVC keep small metafiles in Git that point to data held in a cache or remote storage such as S3 or Google Cloud Storage, so a Git commit can identify an exact data and model version (DVC docs). See also implementing DevOps for machine learning.

Progressive delivery suits models, because a new version can be wrong in ways unit tests do not catch. Two Kubernetes tools fit into a GitOps flow:

StrategyWhat it doesTool support (according to its docs)
Blue-greenRuns the new version beside the current one, lets you test a preview, then promotes itArgo Rollouts uses a preview service and an active service
CanaryMoves traffic to the new version in stagesArgo Rollouts, and Flagger, which also lists A/B testing
Metric-gated promotionChecks metrics before promoting or rolling backArgo Rollouts and Flagger can query providers such as Prometheus and Datadog

For model-specific checks, such as accuracy on held-out data, define the metric in your own monitoring and gate promotion on it. Our post on blue-green deployment in Kubernetes covers the pattern in more detail.

What security and compliance controls does GitOps give you?

Git gives you three controls most audit questions ask for: who may change an environment, a record of every change, and an approval step. The table shows where each comes from and where it stops.

ControlHow GitOps provides itWhere it stops
Access controlOnly people with write access to an environment repository can change that environment, and agents use their own RBACArgo CD ships with broad default roles, and its docs advise narrowing them to the namespaces and resources it manages
Audit trailEach commit records the author and the change messageGit history shows what changed, not whether the running cluster was later edited, so keep drift reporting on
ApprovalProtected branches and reviewed pull requests gate mergesAnyone with write access to a trusted repository can change what is deployed, so protect the branch
SecretsKeep secrets out of plain manifestsUse a documented secrets approach from your tool, such as the Argo CD and Flux secrets management pages

The security points come from the Argo CD security guide and the Flux security page above. For regulated environments, link the repository controls to your control framework as covered in continuous compliance in DevOps. Where AI agents also propose or merge changes, AgentGRC is described on its page as governance, risk and controls for agent compliance, and ElixirData keeps governed context, versioned policy and decision traces in one decision layer above AI agents.

What are the trade-offs, and when is GitOps not the right choice?

ChallengeWhy it happensMitigation
Many environmentsEach environment change needs a Git change, and branches multiplyOne directory per environment, templates through Helm or Kustomize, ApplicationSet for fleets
Rollback is not standardisedA Git revert is easy, but data migrations and dependent services are not reverted by itDefine rollback per service, and test it before you need it
VisibilityGit alone does not show the live state of many clustersUse the agent dashboard and notifications, and monitor the agent
Drift from manual changesEngineers change the cluster by hand in an incidentEnable drift correction, and make emergency changes through a fast-track pull request
Team changePull request workflows are new to some operations teamsStart with one service, and train on review and rollback

GitOps is a poor fit for workloads that are not declarative, such as one-off manual administration, or for a team with a single small environment where a simple pipeline is easier to run. It also does not replace testing: it controls how a change reaches an environment, not whether the change is good. Document and static-site publishing can follow the same pattern with a CI tool, but that is ordinary continuous delivery rather than cluster reconciliation.

How do you adopt GitOps in a sequence that works?

  1. Pick one service with a clear owner and a non-critical blast radius, and express it fully as manifests.

  2. Separate repositories or paths for application source and environment configuration.

  3. Install one agent (Argo CD or Flux) in a test cluster and run it in pull mode with reporting only.

  4. Turn on automation for the test environment, then add drift correction and pruning deliberately.

  5. Add protection: protected branches, required reviews, narrowed agent roles and alerts on failed reconciliation.

  6. Extend to production with progressive delivery, then to more clusters with app-of-apps or ApplicationSet.

To place GitOps in the wider delivery picture, read DevOps metrics for how to measure lead time and change failure rate, and ElixirClaw for an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.

To map one delivery or release decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

GitOps FAQ

What is GitOps in simple terms?

GitOps keeps the desired state of infrastructure and applications in Git, and software agents keep the running system matching it. According to OpenGitOps, the principles are declarative state, versioned and immutable storage, automatic pulling and continuous reconciliation.

Is pull-based GitOps better than push-based?

Pull-based fits the OpenGitOps principles because an agent in the environment pulls state and reconciles it, so deployment credentials stay in the environment and drift is corrected. Push-based is simpler and is still used to provision cloud infrastructure, but the pipeline holds credentials and only acts when a change is made.

Should I choose Argo CD or Flux?

Both are CNCF graduated. Argo CD gives a central application view with OutOfSync reporting, RBAC and SSO. Flux is a set of composable controllers with source, Kustomize, Helm, notification and image automation components. Pick the one that matches how your platform team wants to operate.

Does Argo CD revert manual changes to the cluster?

Only if you enable it. According to its docs, automated sync does not revert live changes unless self-heal is on, and pruning of deleted resources is off by default. Flux Kustomization reconciliation reverts manual kubectl changes unless reconciliation is suspended.

How does GitOps work for machine learning?

Serving manifests and image tags go in Git as for any workload. Large data and model artefacts are versioned by tools such as DVC, which keeps small metafiles in Git pointing to storage. Progressive delivery with Argo Rollouts or Flagger lets you test a new model version on a share of traffic.

When should we not use GitOps?

Avoid it for non-declarative, one-off administration, or where a single small environment is easier to run with a plain pipeline. GitOps controls how a change reaches an environment; it does not replace testing of the change.

Next Steps towards GitOps Processes

Talk to our experts about implementing GitOps processes in your organization. Learn how industries and different departments use declarative workflows and infrastructure as code to become operations-centric. Utilize GitOps to automate and optimize deployments, infrastructure management, and application operations, improving efficiency and reducing mean time to recovery while ensuring consistency across environments.

 

Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in Solving your Challenges with XenonStack Team
Get Started

Get Started with your requirements and primary focus, that will help us to make your solution

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Proceed Next