Kubernetes, EKS, GitOps & releases
Deployment strategies
A deployment strategy decides how a new version replaces the old one and how many users are exposed while you find out whether it works. Senior interviews go well beyond definitions: they expect you to explain the Kubernetes mechanics that make rolling updates safe, design blue-green and canary releases on EKS and AWS load balancers, automate canary analysis, handle database changes without downtime, and have a clear rollback plan. This topic covers all of it, using a Flux-based GitOps setup on EKS as the running example.
After this topic you can
- Choose between rolling, blue/green and canary releases
- Roll out safely with health checks and automatic rollback
- Handle database changes without downtime
Lessons
-
1Core ideas: deploy, release and risk
- Deployment is not release
- What you're trading off
- Vocabulary you should use precisely
-
2Recreate and rolling updates
- Recreate
- Rolling update — how Kubernetes actually does it
- Rolling updates outside Kubernetes
-
3Zero-downtime mechanics
- Getting traffic only to ready pods
- Graceful shutdown: the termination sequence
- Other pieces
-
4Blue-green deployments
- The pattern
- Switching mechanisms
- Managing cost and risk
- Tools
-
5Canary releases
- The pattern
- Ways to split traffic
- What to measure
- Automated canaries with Flagger (fits Flux)
- Argo Rollouts
-
6Feature flags, dark launches, A/B and shadow traffic
- Feature flags
- Dark launch
- Shadow (mirror) traffic
- A/B testing
- Ring deployments
-
7Database and stateful changes
- The fundamental problem
- Expand/contract (parallel change)
- Other compatibility surfaces
-
8Rollback, verification and multi-region rollouts
- Verify every deployment
- Rollback design
- Multi-region and large fleets
- 9Choosing a strategy
-
10Interview questions and model answers
- "Explain blue-green vs canary. Which would you use for a payments API?"
- "How do you achieve zero-downtime rolling updates in Kubernetes?"
- "A rolling update caused a burst of 502s. What happened?"
- "How do you deploy a database schema change with zero downtime?"
- "Your canary's error rate is fine but p99 latency doubled. Promote?"
- "How do you roll back in a GitOps setup with Flux?"
- "Feature flags vs canary releases?"
- "When would you use Recreate?"