Why a Java pod gets OOMKilled in Kubernetes with a half-empty heap
In short. A container memory limit covers everything the JVM uses, and the heap is only part of it. Metaspace, thread stacks, the code cache and direct buffers live outside the heap, so a pod with -Xm