What is Kubernetes GitOps with Argo CD or Flux?

Why Interviewers Ask This

Candidates at the intermediate level are expected to not only know this concept but explain the trade-offs involved. Interviewers use this question to see if you can reason about design decisions, not just recall facts.

Answer

GitOps is an operational model where Git is the single source of truth for declarative infrastructure and application configuration. Changes are made via Git commits; the cluster automatically reconciles to match the Git state. Benefits: full audit trail (Git history), easy rollback (revert commit), developer-friendly workflow, automated drift correction. Argo CD: declarative, GitOps continuous delivery for Kubernetes. Core concepts: Application (maps Git repo path to Kubernetes cluster namespace); sync (apply Git state to cluster); health (actual cluster state health); out-of-sync (cluster drifts from Git). Features: multi-cluster management, SSO, RBAC, app of apps pattern, ApplicationSet (generate many apps from templates), sync hooks (pre-sync, post-sync), resource health (per-resource custom checks), rollback. UI: visual application topology, sync status, resource health, diff view. CLI: argocd app create my-app --repo https://github.com/org/app --path k8s/ --dest-server https://kubernetes.default.svc --dest-namespace production argocd app sync my-app argocd app get my-app argocd app diff my-app. Flux v2 (GitOps Toolkit): Kubernetes-native GitOps toolkit. Multiple controllers: Source Controller (Git repos, Helm repos, OCI), Kustomize Controller (applies kustomizations), Helm Controller (Helm releases), Notification Controller (alerts). Bootstrap: flux bootstrap github --owner=myorg --repository=fleet-infra --branch=main --path=clusters/production. Argo CD vs Flux: Argo CD has a better UI and multi-cluster management; Flux is more flexible and Kubernetes-native. Both are CNCF projects. Choice depends on team preference.

Pro Tip

Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex Kubernetes (K8s) answers easy to follow.