How do you promote a change from dev to staging to prod in a GitOps workflow?
What they are really testing: Whether you understand promotion as a git change (updating the version/values in the next environment, via PR) rather than a manual redeploy, and how review gates fit.
A real interview question
How do you promote a change from dev to staging to prod in a GitOps workflow?
What most people say
drag me
“I would redeploy the application to staging and then to production.”
"Redeploy" is the push-model mindset. In GitOps, promotion is a git change, updating the tracked version in the next environment via a reviewed PR, which the controller then reconciles. The audit and gating come from that.
The follow-ups they ask next
Why promote the same artifact rather than rebuild per environment?
To guarantee prod runs exactly what passed staging. Promoting the same image digest forward avoids the subtle differences a rebuild can introduce, the artifact is immutable and validated.
Where do approval gates live in a GitOps promotion?
On the pull request into the target environment path: required reviews, status checks, and automated analysis. Merging the PR is the gated action that triggers reconciliation.
What the interviewer is listening for
- Promotion = a git/PR change to the next env
- Promotes a known-good immutable artifact
- Gates via PR reviews/checks
What sinks the answer
- "Redeploy to each environment"
- Rebuilds per environment
- No PR/review gating
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“Promotion is [a git change, not a redeploy]: [update the next environment overlay to the known-good version (same image digest that passed before)] via [a reviewed PR, whose merge triggers the controller to reconcile]. Gate it with [required reviews/checks/analysis on the PR]. Rollback is [reverting that commit].”
Keep going with gitops
Foundation
What is GitOps, and what problem does it solve?
Foundation
What is the difference between push-based and pull-based deployment, and why does GitOps prefer pull?
Foundation
What are the core principles of GitOps?
Junior
What are Argo CD and Flux, and how do they differ?
Junior
How does drift detection and self-healing work in GitOps?
Junior
How do you structure repositories for GitOps? Should app code and deployment config live together?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free