Rolling update trong Kubernetes cần cấu hình gì để ít downtime?

Deployment rolling update thay Pods cũ bằng Pods mới dần dần. Để ít downtime cần readiness probe đúng, maxUnavailable thấp, maxSurge phù hợp, graceful shutdown và app xử lý SIGTERM.

Ví dụ:

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

Nếu readiness probe báo ready quá sớm hoặc shutdown không drain request, rolling update vẫn có thể gây lỗi dù Kubernetes strategy nhìn đúng.

Xem toàn bộ Docker & Kubernetes cùng filter theo level & chủ đề con.

Mở danh sách Docker & Kubernetes