CI/CD and infrastructure as code · senior
Release strategies, rollback and GitOps
Rolling, blue-green and canary releases trade cost against risk. In GitOps the Git repository is the source of truth, so rollback means changing Git, and database changes need expand and contract steps.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Rolling update: the Deployment default, cheap, both versions run briefly, rollback is another rollout.
- Blue-green: two full environments and an instant switch back, but double capacity and all users move at once.
- Canary: a small share of traffic goes to the new version and is compared with the old, then raised in steps. It has the smallest blast radius but needs traffic splitting and good metrics. Automated analysis (Argo Rollouts, Flagger) can promote or abort.
- Database changes: use expand and contract. Add the new column in a compatible way, deploy code that works with both, then remove the old part later. A rollback must still work with the schema.
- GitOps: the desired state is in Git, an agent in the cluster reconciles, and every change is a reviewed commit that is easy to revert.
- Pull model: the cluster pulls from Git, so CI needs no cluster credentials, drift is detected and fixed, and a cluster can be rebuilt from Git.
- With self-heal on, a manual kubectl rollout undo is reverted by Argo CD. Roll back with git revert of the release commit or by promoting the previous digest.
- Mutable tags such as stable can point to a different image over time. Use SHA tags or digests and turn on tag immutability in the registry. Keep app code and config in separate repositories, with folders or overlays per environment.
The red pen
Common traps: mistake → fix
Mistake: kubectl rollout undo is a rollback under GitOps
Fix: the agent puts Git back.
Mistake: Canary needs no metrics
Fix: without metrics you cannot compare.
Mistake: Blue-green avoids database problems
Fix: both versions use the same database.
Easy to hard
Questions interviewers ask, easy to hard
- Rolling, blue-green or canary for a payments service?
- How does a schema change affect the choice?
- Our rollback did not roll back with Argo CD. Why?
- What is GitOps and why a pull model?
Practise
Practise with these questions
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.