← Problem Library
K8s L5 K8S 1231 · 20 min

A StatefulSet stays Pending because topology spread and anti-affinity leave no node that also matches the PVC zone

Scheduling logic appears individually reasonable, yet together the rules produce an empty set for the next replica.

K8sPlatform ReliabilityLevel 5Pro20 min
Scenario

A stateful workload scales one replica further and the new pod never schedules despite spare cluster capacity.

What to check first
  • Identify the primary failure signal in the Stateful Placement Deadlock scenario.
  • Separate visible symptoms from the underlying technical dependency.
  • Describe the safest recovery path and the follow-up prevention work.
Checking checklist
  1. Summarize the current impact and the last known change.
  2. Collect direct evidence from logs, runtime state, and configuration before changing anything.
  3. Separate immediate recovery from permanent prevention work.
Recovery and prevention

Treat anti-affinity, spread, and volume topology as one placement contract.

Questions worth viewing together
What should you verify first when A StatefulSet stays Pending appears?

Community-field Kubernetes scheduling problem inspired by Stack Overflow threads about StatefulSet placement deadlocks with spread and storage constraints. Stateful scheduling failures often come from multiple reasonable constraints colliding rather than one obviously broken rule.

What usually causes A StatefulSet stays Pending in production?

Teams often keep adding nodes in the wrong zone when the current constraints still make scheduling impossible.

What should you document after resolving A StatefulSet stays Pending?

Volume topology makes spread and anti-affinity stricter than they look on stateless workloads.