How would you promote a release from dev to staging to production in a GitOps setup with Argo CD?
What the interviewer wants to hear
- Build the image once and promote the same digest
- Environment config in Git as overlays or values per environment
- Promotion is a Git change, usually a pull request updating the image tag or digest
- Automated checks and gates before production, with approvals
- Rollback by reverting the Git commit
- Tools like Argo CD Image Updater or Kargo can automate promotion
Model answer
CI builds the image once, tags it with the commit SHA, signs it and pushes it. The same digest moves through every environment, so what we tested is what we ship. The GitOps repo has a base and an overlay or values file per environment, and Argo CD watches each environment path. Dev is updated automatically by CI or Argo CD Image Updater. Promotion to staging and production is a Git change: a pull request that bumps the image digest in that environment overlay. The staging promotion can be automatic once dev smoke tests pass; production needs the staging checks green plus an approval from the service owner. Argo CD then syncs, ideally through Argo Rollouts for a canary. Rollback is simply reverting the commit, and Git history shows who promoted what and when. For many services, a tool like Kargo can manage these promotion stages for us.
Can you answer it under time pressure?
Take a timed medium round and get scored on every answer.
More medium DevOps Engineer questions
- How do you manage secrets such as database passwords and API keys across CI/CD pipelines and Kubernetes?
- A Pod is stuck in CrashLoopBackOff after a deployment. How do you troubleshoot it?
- Compare rolling, blue-green and canary deployments. How do you decide which to use?
- Developers complain that the CI pipeline takes 40 minutes. How would you make it faster?
- How do you structure Terraform code for multiple environments like dev, staging and production?
- Your team is burning out from on-call pages. How would you redesign alerting and the on-call process?
- When would you package Kubernetes manifests with Helm and when with Kustomize? Can they be combined?
- Users report that one service on Kubernetes became slow since this morning. Walk me through how you would investigate.
- How do you include database schema migrations in a continuous delivery pipeline without causing downtime?