GitOps with ArgoCD — Declarative Continuous Delivery on Kubernetes
GitOps makes your Git repository the single source of truth for what runs in production. Learn the model and how ArgoCD continuously syncs your cluster to match.
Rajesh Vardhan Busam
Kubernetes & Platform Instructor

Once you are running applications on Kubernetes, a new question appears: how do you deploy changes reliably and always know exactly what is running in your cluster? Running manual commands against production is risky and leaves no clear record. GitOps is the answer that has taken over the industry, and ArgoCD is the most popular tool for practising it. This guide explains the model, why it is better than traditional deployment, and how ArgoCD makes it real.
What Is GitOps?
GitOps is a simple but powerful idea: your Git repository becomes the single source of truth for the desired state of your entire system. Every deployment, configuration, and setting is described declaratively in files stored in Git. A controller running inside your cluster continuously compares the live state against what Git says it should be, and makes the cluster match.
You never run manual deploy commands against production. Instead, you change a file in Git, open a pull request, get it reviewed, and merge it. The system then updates itself to match the new declaration. Git becomes your deployment mechanism, your audit log, your rollback tool, and your change-approval process all at once.
Why This Is Better Than Traditional Deployment
- Auditability — every change is a Git commit with an author, a timestamp, and a review. You can answer who changed what and when, instantly.
- Easy rollback — reverting a bad deployment is just reverting a commit, and the system converges back to the previous known-good state.
- No configuration drift — if someone manually changes the cluster, the controller notices the difference and corrects it back to the declared state.
- Consistency — the same process and the same files deploy to development, staging, and production.
- Better security — the CI pipeline no longer needs broad credentials pushed into the cluster from outside; the in-cluster controller pulls approved changes from Git instead.
How ArgoCD Works
ArgoCD is a controller that runs inside your Kubernetes cluster. You point it at a Git repository containing your Kubernetes manifests — plain YAML, Helm charts, or Kustomize configurations. ArgoCD continuously watches both the repository and the live cluster.
When the two differ, ArgoCD marks the application as out of sync and shows exactly which resources differ. It can either wait for you to approve and trigger the change or sync automatically. Its web dashboard visualises every application, its health status, and the precise differences between desired and actual state, making deployments transparent in a way that hand-written scripts never are.
The Typical Workflow
A developer merges application code, and the CI pipeline builds a new container image and pushes it to a registry. The pipeline then updates the image tag in a separate GitOps configuration repository — usually through an automated commit. ArgoCD detects the change in that repository and rolls out the new version to the cluster. Notice the clean separation of responsibilities: CI builds and publishes artifacts, while ArgoCD handles delivery into the cluster. This separation is a hallmark of mature platform engineering, because each side can be secured and reasoned about independently.
Handling Multiple Environments
GitOps shines when you have several environments. You keep the desired state for dev, staging, and production in Git — often as separate directories or branches with environment-specific values. Promoting a change from staging to production becomes a reviewed pull request that copies a known-good configuration forward. There is no guesswork about what differs between environments, because it is all written down and versioned.
Getting Started Sensibly
Begin with a single, non-critical application. Store its Kubernetes manifests in a Git repository, install ArgoCD in your cluster, and connect it to that repository. Practise making a change through a pull request and watching ArgoCD sync it to the cluster. Then practise a rollback by reverting the commit and confirming the cluster returns to the previous state. Once that loop feels natural, expand to more applications and more environments. Learning by doing this small loop is far more effective than reading about it.
Common Mistakes
- Mixing application code and deployment configuration in the same repository, which blurs responsibilities — many teams keep a separate config repository.
- Making manual changes to the cluster and then being surprised when ArgoCD reverts them.
- Enabling automatic sync everywhere before you trust your process — start with manual sync on critical apps.
- Storing secrets in plain text in Git; use a sealed-secrets or external-secrets approach instead.
Frequently Asked Questions
Is GitOps only for Kubernetes? The pattern is most mature and popular with Kubernetes, and ArgoCD is Kubernetes-native, but the underlying idea of Git as the source of truth applies more broadly.
ArgoCD or Flux? Both are excellent GitOps tools. ArgoCD is known for its rich dashboard and is very widely used; Flux is lightweight and integrates tightly with the Kubernetes control loop. The concepts transfer between them.
Does GitOps replace CI? No — they are partners. CI builds and tests your artifacts; GitOps delivers them. You still need a CI pipeline.
Where This Fits in Your Career
GitOps is a defining skill for Platform Engineers and senior DevOps roles — some of the best-paid positions in cloud. Understanding it signals that you think about delivery at a systems level, not just as a sequence of commands. Our Platform Engineering track at Infinity Cloud Labs covers ArgoCD, Helm, and GitOps hands-on, on real clusters — in both English and Telugu.
Tags
