All languages

Kubernetes

You're viewing a free preview. Sign in free to read every script.

Why this exists Four replicas of a Deployment sound resilient, until all four happen to land on the one node that gets drained for a kernel upgrade, and the service goes to zero anyway. Two Kubernetes features, used…

PodDisruptionBudget and Topology Spread: Surviving a Node Drain

A Deployment spread evenly across zones by a topologySpreadConstraint and protected by a PodDisruptionBudget, proven against a real multi-node cluster — the replicas land exactly 2 and 2, and a real kubectl drain evicts one Pod successfully and is genuinely refused on the second with "Cannot evict pod as it would violate the pod's disruption budget."

Sign in free to read this script, along with the rest of the library.

Sign in free