You need to promote the same image from dev to staging to prod. How do you design it?
IntermediateScenarioCI/CD and IaC
Answer
Situation read → Build once, promote by digest.
What I'd do →
- Build and push once with tag
sha-<commit>; record the digest - Deploy to dev automatically; run tests
- Promote to staging and prod by changing only the manifest/values reference (GitOps PR or pipeline stage), same digest
- Optionally
az acr importbetween dev and prod registries to keep prod registry isolated
Why → Rebuilding per environment can produce different artifacts; promoting the same digest means what you tested is what you ship.
Interview tip → Say "build once, deploy many" and "by digest".
More on CI/CD and IaC
Design a GitHub Actions pipeline that builds an image, pushes to ACR and deploys to AKS with no secrets.IntermediateYour organisation uses Azure DevOps. Set up a secure deployment pipeline to AKS.IntermediateTerraform state for prod is in a storage account accessible with account keys. Harden it.IntermediateYour team wants to move from ARM JSON templates to Bicep. How do you migrate?BeginnerA pipeline needs to deploy to dev, test and prod in different subscriptions. How do you handle identities?AdvancedThe Terraform plan for a small change shows the AKS cluster will be replaced. What do you do?Advanced