IICTPIICTP

Blog / Guides

Delivery26 October 20265 min read

GitOps in practice: Argo CD, Flux and policy-as-code

GitOps keeps the desired state of a system in Git and uses an automated agent to make the real system match it. Changes happen by pull request, and the history of Git becomes the audit trail.

In this post
  1. The principles
  2. The tools
  3. Benefits
  4. Adding policy
  5. Sources and further reading

The principles

  • The desired state is declared, for example as Kubernetes manifests.
  • It is stored in Git and versioned.
  • An agent in the cluster pulls changes and applies them.
  • The agent keeps correcting drift.

The tools

Argo CD and Flux are two widely used CNCF projects that do this for Kubernetes. They watch a repository and reconcile the cluster with it.

Benefits

  • Every change is reviewed and recorded.
  • Rollback is a revert.
  • Rebuilding an environment is repeatable.

Adding policy

Policy-as-code tools check changes against rules before they are applied, for example blocking images from unapproved registries. Keep secrets out of Git, and use a secrets manager instead.

Sources and further reading

  1. OpenGitOps. GitOps Principles. opengitops.dev.
  2. Argo CD. argo-cd.readthedocs.io.

IICTP is a new independent credential and is not ISO/IEC 17024 accredited.

Keep reading

← All posts

Where do you stand?

Find the credential that fits the work you do.