Menu

Why Kubernetes In-Place Memory Resize Gets Stuck "In Progress" on JVM Pods
📰

Why Kubernetes In-Place Memory Resize Gets Stuck "In Progress" on JVM Pods

DEV Community: java·BaoKhang·2 days ago
#HpqbtRW6
#devtojava#devto#dev#memory#resize
Reading 0:00
15s threshold

You lowered a JVM pod's memory with an in-place resize, and the pod now shows PodResizeInProgress , an Error reason, and an old memory limit that never changes. The kubelet is not broken. It refuses to lower a memory limit below the container's current usage, and a JVM keeps its committed heap even after the objects in it are garbage. The resize completes as soon as the JVM gives the memory back, which I confirmed on a Kubernetes 1.35.8 cluster. Below are the real outputs, the fix, and how long it took.

The short answer

Cause: the kubelet will not apply a memory-limit decrease while the container's current usage is above the new limit. A JVM's usage stays high after garbage collection because it keeps the heap committed.

Symptom: condition PodResizeInProgress=True with reason Error . containerStatuses[].allocatedResources shows the new value, but containerStatuses[].resources still shows the old one.

It retries. The kubelet retried about every 11 to 15 seconds.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.