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 →
- Export what the pipeline applies into a config repo (same manifests, same names and namespaces).
- Create Applications without automated sync, then
argocd app diffeach one until the diff is empty or understood. - Sync manually; Argo CD adopts the existing objects (it adds tracking metadata, pods are not restarted when specs match).
- Remove the
kubectl applystage from Jenkins and replace it with a step that commits the new image tag. - 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.
More on Adopting GitOps & Repo Design
A startup with three services asks whether they need a separate config repo. What do you recommend?BeginnerA team wants a Git branch per environment (`dev`, `staging`, `prod`). How do you respond?IntermediateDevelopers keep running `kubectl edit` in production to "quickly fix" things. How do you stop it without blocking incident response?IntermediateYou must deploy one microservice to 4 environments with Helm. Which values structure do you choose?BeginnerYour config repo has 400 Applications in one monorepo and every commit triggers a refresh of everything. What do you change?AdvancedManagement asks for proof of who deployed what to production and when, for an audit. How does GitOps answer this?Beginner