Course contentsShow
← Cloud and Infrastructure
Lesson 1189 of 2,98923. Kubernetes WorkloadsFree lesson

DaemonSet Update Parameters

Using maxUnavailable and maxSurge to control the pace of DaemonSet rolling updates.

DaemonSet Update Parameters

What you'll learn: How to fine-tune the speed and safety of DaemonSet rolling updates using maxUnavailable and maxSurge parameters.

Core Concept

When you perform a rolling update on a DaemonSet (which you learned about in the previous lesson), Kubernetes doesn't update all pods at once—it follows a controlled pace. Two key parameters let you tune this behavior: maxUnavailable and maxSurge.

maxUnavailable

This parameter controls how many DaemonSet pods can be unavailable simultaneously during an update. Think of it like a construction crew repaving a highway: if maxUnavailable is set to 1, they'll only close one lane at a time, keeping traffic flowing.

  • Can be an absolute number (e.g., 3) or percentage (e.g., 20%)
  • Default is typically 1, meaning one pod updates at a time
  • Higher values = faster updates but more risk

maxSurge

This parameter allows you to create extra pods temporarily during the update before terminating old ones. It's like having replacement workers arrive before the old shift leaves—zero downtime.

  • Also accepts absolute numbers or percentages
  • maxSurge: 1 means one extra pod can exist temporarily per node
  • Provides smoother transitions but uses more resources briefly

The Balancing Act

Together, these parameters let you balance update speed against stability:

  • Conservative: maxUnavailable: 1, maxSurge: 0 — slow but safe, one pod at a time
  • Aggressive: maxUnavailable: 3, maxSurge: 1 — faster updates with temporary resource overhead
  • Zero-downtime priority: Lower maxUnavailable, higher maxSurge

Key Takeaway: maxUnavailable and maxSurge give you precise control over DaemonSet rolling update speed and risk—tune them based on whether you prioritize update velocity or service continuity.