Agency

Mastering OpenShift GitOps with Argo CD: Building Reliable, Automated, and Scalable Kubernetes Delivery

OpenShift GitOps with Argo CD addresses the challenge of managing Kubernetes deployments by making Git the source of truth for application and infrastructure configuration.

LAST UPDATED: June 27, 2025
9 min read
Mastering OpenShift GitOps with Argo CD: Building Reliable, Automated, and Scalable Kubernetes Delivery

Kubernetes gives engineering teams a powerful platform for running modern applications, but managing deployments consistently across clusters, environments, and teams can become difficult surprisingly quickly. OpenShift GitOps with Argo CD addresses this challenge by making Git the source of truth for application and infrastructure configuration. Instead of manually applying changes to clusters, teams define the desired state in Git and let Argo CD continuously reconcile that state with what is actually running. The result is a deployment model that is more auditable, repeatable, and resilient—but only when teams design their repositories, environments, security policies, promotion workflows, and operational boundaries carefully.

Why Kubernetes Deployments Become Difficult to Manage

Kubernetes makes application deployment highly declarative.

But organizations rarely have only one application and one cluster.

A typical enterprise environment might contain:

Development
     ↓
Testing
     ↓
Staging
     ↓
Production
     ↓
Multiple Clusters

Now add:

Multiple teams

Different application versions

Infrastructure configuration

Security policies

Secrets

Autoscaling

Network policies

Ingress

Operators

The deployment model can quickly become complicated.

Without a consistent operating model, engineers may start relying on:

kubectl apply
      +
Manual Changes
      +
Scripts
      +
Documentation
      +
"Don't forget this setting"

That creates a dangerous problem:

The cluster can become different from what the team believes is defined in source control.

GitOps attempts to eliminate that ambiguity.

What Is OpenShift GitOps?

OpenShift GitOps is Red Hat's GitOps solution built around Argo CD and designed for OpenShift environments.

The central principle is straightforward:

Git contains the desired state, and the cluster should continuously converge toward it.

The model looks like:

Git Repository
      ↓
Desired Configuration
      ↓
Argo CD
      ↓
OpenShift Cluster
      ↓
Running Application

When the desired configuration changes:

Git Change
    ↓
Argo CD Detects Change
    ↓
Reconciliation
    ↓
OpenShift Updated

This turns Git into more than a code repository.

It becomes a record of what the environment is supposed to look like.

Understanding Argo CD and the GitOps Model

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.

Its job is to compare:

Desired State
     │
     │
     ▼
   Argo CD
     │
     │
     ▼
Actual State

If the two match:

Desired = Actual
      ↓
   Synced

If they differ:

Desired ≠ Actual
      ↓
    Drift
      ↓
Reconciliation

This creates a continuous control loop.

The important difference from traditional deployment pipelines is that deployment is not simply:

"Run these commands once."

Instead, it becomes:

"Continuously ensure the cluster matches the declared state."

Desired State vs. Actual State

This is the heart of GitOps.

Imagine Git declares:

replicas: 5

but the cluster is running:

replicas: 3

Argo CD can identify the difference.

Git
replicas: 5
      │
      ▼
   Argo CD
      │
      ▼
Cluster
replicas: 3

The application is now OutOfSync.

Depending on the configured operating model, Argo CD can reconcile the cluster toward the desired state.

This creates an important operational advantage:

The deployment state becomes observable.

Instead of asking an engineer:

"What is currently deployed?"

the team can inspect the GitOps system and compare desired and live state.

Why Drift Detection Matters

Manual changes are inevitable in real environments.

An engineer may change:

Deployment
   ↓
replicas: 5 → 8

directly in the cluster.

Git still says:

replicas: 5

Now the environments disagree.

GitOps makes that disagreement visible.

Git
  ↓
Desired = 5

Cluster
  ↓
Actual = 8

        ↓

      DRIFT

That creates an important governance mechanism.

The team can then decide:

Was the manual change intentional?

If yes, update Git.

If no, reconcile the cluster.

The goal is not to prevent every manual action.

It is to prevent undocumented changes from becoming permanent infrastructure.

Structuring Git Repositories for GitOps

Repository structure matters more than it first appears.

A poorly organized repository can become difficult to maintain as applications and environments grow.

A conceptual structure might look like:

gitops/
│
├── applications/
│   ├── frontend/
│   ├── backend/
│   └── payments/
│
├── environments/
│   ├── dev/
│   ├── staging/
│   └── production/
│
└── infrastructure/
    ├── networking/
    ├── monitoring/
    └── policies/

The exact structure should reflect how your organization manages ownership and deployment.

The important principle is:

A Git repository should make the desired environment understandable to humans as well as automation.

Avoid turning Git into an unreadable collection of generated YAML.

Managing Multiple Environments

Most organizations have several environments:

Development
     ↓
QA
     ↓
Staging
     ↓
Production

The challenge is avoiding unnecessary duplication.

A common approach is to maintain:

Base Configuration
        │
        ├── Development Overrides
        ├── Staging Overrides
        └── Production Overrides

Tools such as:

Kustomize

Helm

can help manage environment-specific configuration.

The goal is to keep common application configuration reusable while making environment-specific differences explicit.

For example:

Application
  ├── Base Image
  ├── Base Service
  └── Base Deployment

Production
  ├── Replicas
  ├── Resources
  └── Domain

This is much easier to maintain than copying the entire application manifest into four separate directories.

Application Promotion and Releases

GitOps changes the meaning of promotion.

A traditional deployment might look like:

Build
 ↓
Deploy Dev
 ↓
Deploy QA
 ↓
Deploy Production

A GitOps approach can represent promotion as a Git change:

Application v1.4
      ↓
Development
      ↓
Validation
      ↓
Update Staging Configuration
      ↓
Validation
      ↓
Update Production Configuration

The deployment itself becomes the consequence of changing the desired state.

This gives the team an auditable trail:

Who changed it?
      ↓
Git Commit
      ↓
What changed?
      ↓
Pull Request
      ↓
When?
      ↓
Git History

That is particularly valuable for regulated environments.

GitOps and Pull Requests

Pull requests become an operational control point.

A production deployment might require:

Developer
   ↓
Pull Request
   ↓
Review
   ↓
Automated Validation
   ↓
Approval
   ↓
Merge
   ↓
Argo CD
   ↓
Production

This provides:

Peer review

Audit history

Automated checks

Clear ownership

Rollback history

Deployment becomes part of the normal software-development workflow.

Managing Secrets Securely

GitOps introduces an important question:

If Git is the source of truth, where do secrets go?

The answer should not be:

"Commit passwords into Git."

Sensitive values need dedicated secret-management strategies.

Depending on your environment, this might involve:

External secret managers

Sealed secrets

Secret operators

Platform-managed credentials

The conceptual architecture is:

Git
 │
 ├── Configuration
 │
 └── Secret Reference
          │
          ▼
     Secret Manager
          │
          ▼
       OpenShift

The repository defines what secret is required without necessarily storing the secret value itself.

This separation is critical.

Argo CD and OpenShift Security

OpenShift provides strong security capabilities, but GitOps must still be designed around least privilege.

Argo CD should have only the permissions required for the resources it manages.

Think in terms of:

Argo CD
   ↓
Application Project
   ↓
Allowed Namespace
   ↓
Allowed Resources

Avoid giving broad cluster-wide permissions simply because they are convenient.

Security boundaries should reflect organizational boundaries.

For example:

Team A
  ↓
Namespace A

Team B
  ↓
Namespace B

This reduces the blast radius of configuration mistakes.

Handling Drift and Configuration Changes

One of the biggest GitOps benefits is drift visibility.

Imagine:

Git
 └── replicas: 4

Cluster
 └── replicas: 7

Argo CD identifies the difference.

The team then has two choices:

Intentional Change

Update Git:

replicas: 7

Accidental Change

Reconcile the cluster back to:

replicas: 4

This establishes a powerful rule:

Production configuration should not exist only inside the cluster.

If it matters, it should be represented in the desired-state repository.

Scaling GitOps Across Teams and Clusters

GitOps becomes increasingly valuable when organizations operate multiple clusters.

For example:

                    Git
                     │
                  Argo CD
                     │
        ┌────────────┼────────────┐
        ▼            ▼            ▼
     Cluster A    Cluster B    Cluster C
        │            │            │
      Dev          Staging      Production

Applications can be deployed consistently across environments.

This is especially useful for:

Multi-region systems

Development clusters

Production clusters

Disaster recovery

Edge environments

The deployment mechanism stays consistent even when the infrastructure topology changes.

ApplicationSets and Large-Scale Management

As the number of applications grows, manually creating Argo CD applications can become repetitive.

ApplicationSet-style patterns can help generate application deployments based on:

Clusters

Repositories

Environments

Directories

Labels

Conceptually:

Application Definition
        │
        ▼
ApplicationSet
        │
   ┌────┼────┐
   ▼    ▼    ▼
 Dev  Stage  Prod

This allows organizations to manage deployment patterns at a higher level.

The goal is to avoid copying the same deployment configuration repeatedly.

Observability and Operational Visibility

GitOps should make deployment state more visible, not hide it.

Teams should monitor:

Application health

Sync status

Deployment failures

Drift

Resource health

Rollout progress

The broader platform should also provide:

Logs

Metrics

Traces

Alerts

A useful operational model is:

Git Change
    ↓
Argo CD
    ↓
Deployment
    ↓
Application
    ↓
Metrics + Logs
    ↓
Feedback

If a deployment succeeds technically but causes application errors, the GitOps system should not be considered the end of the monitoring chain.

Progressive Delivery and GitOps

GitOps works particularly well with controlled release strategies.

Instead of:

100% Production

immediately, teams can use:

5%
 ↓
25%
 ↓
50%
 ↓
100%

depending on their deployment tooling and operational requirements.

This allows teams to combine Git-driven desired state with:

Canary releases

Blue-green deployments

Automated analysis

Gradual rollouts

The objective is simple:

Reduce the blast radius of a bad release.

Common OpenShift GitOps Mistakes

Treating GitOps as Just Another CI Pipeline

GitOps is about continuous reconciliation, not merely running deployment commands from CI.

Putting Secrets Directly in Git

Never trade deployment convenience for credential exposure.

Allowing Constant Manual Changes

If engineers frequently modify production directly, Git stops being a reliable source of truth.

Creating Huge YAML Repositories

Configuration should remain understandable and maintainable.

Duplicating Every Environment

Use appropriate templating or overlays to minimize unnecessary duplication.

Giving Argo CD Excessive Permissions

Follow least-privilege principles.

Ignoring Drift

Drift detection is one of GitOps's biggest advantages.

Use it.

Treating "Synced" as "Healthy"

A resource can match Git and still have an application-level failure.

Git state and application health are different signals.

A Modern OpenShift GitOps Architecture

A production GitOps platform can look like:

                         Developers
                              │
                              ▼
                       Git Repository
                              │
                     Pull Request / Review
                              │
                              ▼
                       Merge to Main
                              │
                              ▼
                           Argo CD
                              │
              ┌───────────────┼───────────────┐
              ▼               ▼               ▼
          OpenShift       OpenShift       OpenShift
           Dev              Stage           Prod
              │               │               │
              └───────────────┼───────────────┘
                              │
                       Observability
                    /       │        \
                  Logs     Metrics    Traces

Supporting the entire platform:

Identity

Secrets management

Policy

Security scanning

CI

Artifact repositories

Monitoring

This creates a complete software-delivery feedback loop.

How to Adopt GitOps Incrementally

You do not need to move your entire organization to GitOps overnight.

Start with one application.

Step 1 — Identify the Current Desired State

Document what is actually running.

Step 2 — Put Configuration in Git

Move deployment configuration under version control.

Step 3 — Install and Configure Argo CD

Connect the repository to the target OpenShift environment.

Step 4 — Establish Sync and Health Rules

Define how deployments should be reconciled.

Step 5 — Remove Unnecessary Manual Deployment Steps

Let Git changes drive releases.

Step 6 — Add Pull Request Controls

Introduce review and automated validation.

Step 7 — Introduce Environment Promotion

Move changes through development, staging, and production.

Step 8 — Expand to More Applications

Standardize successful patterns rather than copying everything blindly.

When OpenShift GitOps Makes Sense

OpenShift GitOps is particularly compelling for organizations managing:

Multiple Kubernetes/OpenShift environments

Regulated workloads

Large engineering teams

Frequent application deployments

Infrastructure as code

Multi-cluster platforms

Strict audit requirements

Standardized release processes

It becomes especially valuable when the question:

"What is actually running in production?"

has historically required checking several systems manually.

GitOps makes the answer much more explicit.

When GitOps May Not Need to Be Complicated

Not every application needs an elaborate GitOps platform.

A small team with:

One application

One cluster

Infrequent deployments

may not need a highly sophisticated repository hierarchy.

The goal is not to maximize GitOps complexity.

It is to gain:

Repeatability

Visibility

Auditability

Consistency

Start with the smallest workflow that delivers those benefits.

Making the Call

Engineering and platform leaders should ask:

Where does our production configuration actually live today?

How often do manual changes occur?

Can we reconstruct who changed production and why?

How consistently do we deploy across environments?

What happens when production drifts from source control?

How are secrets managed?

How much cluster access does our deployment system really need?

Can we roll back a configuration change reliably?

Most importantly:

Can our team trust Git to describe what the environment is supposed to look like?

If the answer is no, GitOps can provide a meaningful architectural improvement.

Final Takeaway

OpenShift GitOps with Argo CD is fundamentally about creating a reliable feedback loop between what the organization declares and what the platform actually runs.

The model is simple:

Git
 ↓
Desired State
 ↓
Argo CD
 ↓
OpenShift
 ↓
Actual State
 ↓
Reconciliation
 ↓
Desired State

That loop provides:

Repeatable deployments

Configuration visibility

Drift detection

Auditability

Controlled promotion

Multi-cluster consistency

Better operational discipline

But GitOps is not simply a tool installation.

The biggest challenges are organizational and architectural:

Repository design

Environment management

Secret handling

Security boundaries

Application ownership

Promotion strategy

Operational monitoring

Rollback planning

The real power of GitOps is not that it deploys Kubernetes resources from Git. It is that it creates a shared, reviewable definition of what your infrastructure and applications are supposed to be—and continuously works to keep reality aligned with that definition.

When OpenShift, Argo CD, CI pipelines, security controls, observability, and disciplined Git workflows work together, application delivery becomes much more predictable.

The future of Kubernetes operations is not about giving engineers more commands to run. It is about reducing the number of commands they need to run manually—and replacing fragile operational knowledge with version-controlled, observable, continuously reconciled systems.

Frequently Asked Questions

OpenShift GitOps is Red Hat's GitOps solution built around Argo CD and designed for OpenShift environments, where Git contains the desired state and the cluster continuously converges toward it.
Drift detection makes manual cluster changes visible, highlighting discrepancies between the running state and Git source control, preventing undocumented changes from becoming permanent.
No, sensitive values need dedicated secret-management strategies, such as external secret managers or sealed secrets, rather than being committed in plain text to Git.

Need a product built?

We build custom software, mobile apps, and web platforms for startups and enterprises.

Alejandro D.
Vatsalya R.Backend Developer
Gustavo A.
Ganeshan S.Sr. Software Engineer
Fiorella G.
Uptal JoshiSr. Data Scientist

Their team became an extension of ours — within months they'd rebuilt our entire product experience from the ground up.

BitForge
Sr. ArchitectBitForge
Read Case Study