Automating deployments, promotions across environments, and using different strategies like rolling or canary.
- Promotion Across Environments
- K8s Deployment Strategies (Rolling, Blue/Green, Canary)
- Examples of Blue/Green & Canary
- Bonus: Canary/Blue-Green in Kubernetes
- Argo Rollouts Explanation
- Scenario: Slow Canary Deployments with Argo Rollouts
Question:
You have dev, staging, and prod environments. How would you automate moving a service from dev to staging, then on to prod, with proper checks along the way?
Hints / Key Points
- Multi-stage pipeline with approvals or gating (manual or automated).
- Same config, but different overrides for each environment (Helm or plain YAML).
- Possibly a final manual step for production if your org requires it.
Question:
You want minimal downtime and easy rollback. Compare rolling updates, blue/green deployments, and canary releases.
Hints / Key Points
- Rolling: Replaces pods one by one; simpler to set up but partial downtime if something goes wrong mid-roll.
- Blue/Green: Parallel environments; easy rollback by flipping traffic back.
- Canary: Gradual traffic shift, letting you observe performance in real time with a fraction of traffic.
Question (Scenario):
Your new microservice is critical, and you’re debating between blue/green and canary. Give a quick example of each strategy to show how you’d roll out a new version.
Hints / Key Points
-
Blue/Green:
- Deploy new version in parallel (green).
- Test it, switch traffic once stable.
- Rollback by switching to old (blue) if needed.
-
Canary:
- Send small % of traffic to new version.
- Watch metrics, gradually increase if stable.
- Roll back if problems arise.
Question:
Can you do canary or blue-green deployments directly in Kubernetes without extra tools?
Hints / Key Points
- Yes, but you have to handle traffic splits, labels, or separate services yourself.
- Tools like Argo Rollouts or a service mesh (Istio) make it easier.
Question:
What is Argo Rollouts, and how does it help with advanced deployment strategies?
Hints / Key Points
- Kubernetes controller that replaces Deployments with CRDs.
- Supports canary, blue-green, progressive rollouts with health checks.
- Integrates with ingress controllers or service meshes for traffic shaping.
Question:
You set up Argo Rollouts for canary deployments, but traffic shifting is slower than expected, delaying the rollout.
- What steps do you take to debug this behavior?
- How can you ensure canary traffic shifts happen faster?
Hints / Key Points
- Check the Rollout object for correct strategy, weights, and health checks.
- Make sure the ingress or service mesh is applying traffic splits properly.
- Validate that health checks or success criteria aren’t too strict, causing slow or paused progress.
- Monitor logs or metrics to see if pods are failing readiness or not meeting thresholds.