Interview Prep/GitOps & Argo CD/Adopting GitOps & Repo Design

Your team deploys with Jenkins running `kubectl apply` and wants to move to Argo CD without downtime. How do you migrate?

IntermediateScenarioAdopting GitOps & Repo Design
Answer

Situation read → Workloads already exist; Argo CD must adopt them, not recreate them.

What I'd do →

  1. Export what the pipeline applies into a config repo (same manifests, same names and namespaces).
  2. Create Applications without automated sync, then argocd app diff each one until the diff is empty or understood.
  3. Sync manually; Argo CD adopts the existing objects (it adds tracking metadata, pods are not restarted when specs match).
  4. Remove the kubectl apply stage from Jenkins and replace it with a step that commits the new image tag.
  5. Enable auto-sync, then prune and self-heal, one service at a time.

Why → Adopting matching manifests is non-disruptive; enabling prune before the diff is clean risks deleting resources Jenkins created that are not in Git.

Interview tip → Say "diff to zero before enabling automation" and mention removing CI's cluster credentials as the finish line.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Adopting GitOps & Repo Design