Skip to main content
CloudBit Logo
DevOps

GitOps with Argo CD: declarative, auditable deployments on Kubernetes

With GitOps, the repository is the single source of truth and the cluster syncs itself. What it solves, how to implement it and which mistakes to avoid.

· 6 min read · CloudBit team

What GitOps is

In GitOps, the desired state of applications and cluster configuration lives in a Git repository. An agent inside the cluster, such as Argo CD or Flux, continuously compares that state with what is running and applies the differences. Deploying means merging a pull request.

What problems it solves

Every change is recorded with author, review and date. Rolling back is reverting a commit. Manual changes in the cluster are detected as drift and corrected automatically. And the CI pipeline no longer needs cluster admin credentials: it only publishes images and updates the repository.

Application repo and deployment repo

A common practice is to separate application code from deployment manifests. The pipeline builds the image, tags it with the commit hash and opens a change in the deployment repository with the new version. Promoting from staging to production is another pull request, with its own approval.

Secrets in GitOps

Secrets are never stored in plain text in Git. Common options on AWS are External Secrets Operator, which reads from Secrets Manager, or Sealed Secrets, which stores encrypted versions only the cluster can decrypt.

Common mistakes

Mixing manual deployments with GitOps makes the agent revert changes and causes confusion. Enabling automatic sync with resource pruning without understanding its scope can delete things you didn't expect. Start with one application, manual sync and drift alerts; automate once the team is comfortable.

Want to apply this at your company?

Book a free 30-minute technical consultation.

Talk to a specialist