Deployment strategies

Published: (January 5, 2026 at 05:38 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Rolling Update

What it is
Kubernetes gradually replaces old Pods with new Pods, providing zero downtime when configured correctly.

How it works

  • Some old Pods are terminated.
  • New Pods are created step by step.
  • Traffic is shared during the transition.

Key settings

strategy:
  type: RollingUpdate
  rollingUpdate:
    maxUnavailable: 1
    maxSurge: 1

Pros

  • Zero downtime (default behavior).
  • Simple and production‑ready.

Cons

  • Old and new versions run together, which can complicate database/schema changes.

When to use

  • Most web apps, APIs, and microservices.

Recreate

What it is
All old Pods are stopped, then new Pods are created.

Config

strategy:
  type: Recreate

Pros

  • Very simple.
  • No version mixing.

Cons

  • ❌ Downtime – users see a service interruption.

When to use

  • Single‑instance apps.
  • Development / test environments.
  • Applications that cannot run multiple versions simultaneously.

Blue‑Green

What it is
Two environments are maintained:

  • Blue – the current version.
  • Green – the new version.

Traffic switches instantly from blue to green.

How to implement

  1. Deploy the new version to a separate set of Pods (green).
  2. Update the Service selector (or Ingress) to point to the green Pods.

Pros

  • Instant rollback.
  • No downtime.
  • Very safe deployment.

Cons

  • Requires double the resources while both environments exist.
  • Typically manual or tool‑driven.

When to use

  • High‑risk releases.
  • Critical production systems.

Canary

What it is
The new version is released to a small percentage of users, then traffic is gradually increased.

How to implement

  • Deploy fewer replicas for the canary version, or
  • Use traffic splitting via Ingress or a Service Mesh.

Pros

  • Very low risk; bugs are detected early.

Cons

  • More complex setup.
  • Requires monitoring and metrics.

When to use

  • Large user bases.
  • Performance‑sensitive applications.

A/B Testing

What it is
Different users receive different versions based on headers, cookies, or regions.

Pros

  • Enables business experimentation and feature comparison.

Cons

  • Complex setup.
  • Not a pure “deployment” strategy.

When to use

  • Feature testing.
  • Product experiments.

Strategy Comparison

StrategyDowntimeRiskComplexityProduction Use
Rolling UpdateNoMediumLow✅ Yes
RecreateYesHighVery Low❌ Rare
Blue‑GreenNoLowMedium✅ Yes
CanaryNoVery LowHigh✅ Yes
A/B TestingNoVery LowVery High⚠️ Special
Back to Blog

Related posts

Read more »

쿠버네티스 클라우드 환경, 전사적 가시성 확보할 때

클라우드 성능은 여전히 안개 속에 있다. 많은 기업이 클라우드 전환을 마쳤거나 진행 중이지만, 정작 클라우드 환경 전반에 대한 가시성을 충분히 확보하고 있는지에 대해서는 여전히 의문이 남는다. 현재 어떤 도구를 사용하고 있는지, 그 도구가 실제로 효과적인지, 그리고 클라우드 뿐 아니라...