Kubernetes interview question · Most asked

What is GitOps, and how do Argo CD or Flux implement it?

Summary

GitOps uses Git as the source of truth for desired cluster state: changes are made by pull request, and an in-cluster agent (Argo CD or Flux) continuously pulls the repository and reconciles the cluster to match, reporting and optionally correcting drift.

Longer Answer

Benefits: audit trail and review for every change, easy rollback (revert a commit), no CI system holding cluster-admin credentials (pull rather than push), and self-healing against manual changes. Typical setup: CI builds and pushes an image, then updates the image tag in the environment's manifests (or an image updater does it); Argo CD syncs.

Design points: repository structure (app repos versus config repos, environments as directories or branches), secrets (External Secrets, Sealed Secrets, SOPS), progressive delivery (Argo Rollouts, Flagger), and handling drift alerts rather than letting people kubectl edit in production.

Key Points

  • Git as source of truth; pull-based agents.
  • PR review, audit, easy rollback.
  • No cluster credentials in CI.
  • Plan repo layout and secrets.

More most-asked Kubernetes questions

← All Kubernetes questions