A team wants a Git branch per environment (`dev`, `staging`, `prod`). How do you respond?
IntermediateScenarioAdopting GitOps & Repo Design
Answer
Situation read → Branch-per-environment feels natural but causes drift between branches.
What I'd do →
- Explain the problems: merge conflicts, environment-specific commits leaking on merge, cherry-picks, and no side-by-side view of differences.
- Propose folders on
main:envs/dev,envs/staging,envs/prodwith Kustomize overlays or Helm value files. - Promotion becomes a PR that changes one value in the next folder, protected by CODEOWNERS.
- Point every Application at
mainwith a differentpath.
Why → Folders make differences explicit and reviewable; branches hide them in history.
Interview tip → Mention git diff envs/staging envs/prod as the killer demo for folders.
More on 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?IntermediateA startup with three services asks whether they need a separate config repo. What do you recommend?BeginnerDevelopers 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