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

You inherit a cluster with dozens of resources created by hand and nobody knows what is needed. How do you bring it under GitOps?

IntermediateScenarioAdopting GitOps & Repo Design
Answer

Situation read → Unknown state; risk of deleting something important.

What I'd do →

  1. Export resources per namespace (kubectl get ... -o yaml), strip status and server fields (kubectl neat helps), and commit as a starting point.
  2. Create Applications per namespace or service with manual sync and no prune.
  3. Enable orphanedResources: {warn: true} on the project to list what is still not in Git.
  4. Iterate until diffs are empty and orphans are explained, then enable automation.
  5. Clean up: move hand-written YAML into proper Helm/Kustomize structure.

Why → Adopt first, refactor later; orphan warnings give you a to-do list.

Interview tip → Emphasize no prune until orphans are understood.

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

More on Adopting GitOps & Repo Design