Opscraft
Kubernetes, EKS, GitOps & releases

Deployment strategies

Must-know10 lessons · 40 min · 3 tests ·

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.

Stage 3 · Production platforms

Know these first

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

  1. 1Core ideas: deploy, release and risk 3 min read
    • Deployment is not release
    • What you're trading off
    • Vocabulary you should use precisely
  2. 2Recreate and rolling updates 5 min read
    • Recreate
    • Rolling update — how Kubernetes actually does it
    • Rolling updates outside Kubernetes
  3. 3Zero-downtime mechanics 4 min read
    • Getting traffic only to ready pods
    • Graceful shutdown: the termination sequence
    • Other pieces
  4. 4Blue-green deployments 4 min read
    • The pattern
    • Switching mechanisms
    • Managing cost and risk
    • Tools
  5. 5Canary releases 6 min read
    • The pattern
    • Ways to split traffic
    • What to measure
    • Automated canaries with Flagger (fits Flux)
    • Argo Rollouts
  6. 6Feature flags, dark launches, A/B and shadow traffic 4 min read
    • Feature flags
    • Dark launch
    • Shadow (mirror) traffic
    • A/B testing
    • Ring deployments
  7. 7Database and stateful changes 3 min read
    • The fundamental problem
    • Expand/contract (parallel change)
    • Other compatibility surfaces
  8. 8Rollback, verification and multi-region rollouts 4 min read
    • Verify every deployment
    • Rollback design
    • Multi-region and large fleets
  9. 9Choosing a strategy 3 min read
  10. 10Interview questions and model answers 4 min read
    • "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?"