A deployment needs to be rolled back at 2 AM. What does your rollback look like?
BeginnerScenarioDeployment Strategies and GitOps
Answer
Situation read → Speed and safety matter.
What I'd do →
- Kubernetes:
kubectl rollout undo deployment/app -n prodandkubectl rollout status deployment/app. - GitOps:
git revert <sha>and let Argo CD/Flux sync, so Git stays the truth. - Verify with health checks and dashboards, then open an incident ticket.
Why → Rollback should be a rehearsed one-command operation, not a rebuild.
Interview tip → Rolling back application code is easy; rolling back data is not, so say that.