Post

Today in "weird shit Kubernetes does": did you know that if you try to do an in-place resize for a pod, the result can be one of three states?

1 repost1 like

Those states are "yes, did it", "nope, sorry, can't fit", and "well it can't fit RIGHT NOW, but it might fit sometime in the far distant future, so I'm just gonna sit here forever and hope" (The technical term for the last state is "Deferred", in case you're curious)

The main way you can get into this state (aside from just "durrrr it took containerd 20 seconds longer than expected) is if you have pod requests != limits.

In this case, your pod might try to resize up, but all the other pods on the node are being greedy jerks and hogging all the resources, so kubelet's like "Welp I'll just wait for everyone else to stop being a greedy jerk 🤷"

Fourth gotcha: Deferred gets re-evaluated whenever something on the node frees up, but Infeasible is terminal: kubelet never retries until you touch the spec again. Both land as a PodResizePending condition (reason Deferred/Infeasible), so alert on that condition, not on spec vs status drift.