GitOps with Argo CD
Explain GitOps for Kubernetes. How does it differ from CI kubectl apply?
Answers use simple, clear English.
Quick interview answer
Git is the desired state; a controller (Argo CD/Flux) continuously reconciles the cluster to match Git. CI builds/pushes images and updates manifests in Git; the cluster pulls changes. Differs from CI push (kubectl/helm from pipeline) by providing drift detection, audit via Git history, and easier rollback with git revert.
Detailed answer
Git is the desired state; a controller (Argo CD/Flux) continuously reconciles the cluster to match Git. CI builds/pushes images and updates manifests in Git; the cluster pulls changes. Differs from CI push (kubectl/helm from pipeline) by providing drift detection, audit via Git history, and easier rollback with git revert. Secrets need Sealed Secrets/ESO — not plain Git.
Real example & use case
Image tag bump PR in gitops repo → Argo syncs Deployment.
Pros & cons
Pros: drift control + audit. Cons: secrets/tooling complexity.