Every Pod in a namespace gets `limits.memory: 512Mi` that nobody configured, and big services are OOMKilled.
IntermediateTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → A LimitRange in the namespace injects default limits and defaultRequest into containers that do not set them.
Diagnose →
kubectl get limitrange -n shop -o yaml
kubectl get pod api-x -n shop -o jsonpath='{.metadata.annotations}' | grep -i limitrange
Fix → Set explicit resources on the workload, or adjust the LimitRange defaults to something sensible for that team.
Prevent → Document namespace defaults, and require explicit resources on production Deployments with a policy so defaults are a safety net, not the plan.
More on Resources, OOM, probes and termination
`kubectl describe pod` shows `Last State: Terminated, Reason: OOMKilled, Exit Code: 137`.BeginnerA Java service is OOMKilled at 2 GiB limit but the heap is only `-Xmx1800m`.IntermediateMany Pods on one node were killed at once and the node shows a `SystemOOM` event. Container limits were not reached.AdvancedPods show `Evicted` with `The node was low on resource: memory. Threshold quantity: 100Mi, available: 87Mi. Container app was using 1.4Gi, request is 256Mi`.IntermediateA Pod is evicted with `Pod ephemeral local storage usage exceeds the total limit of containers 1Gi`.Intermediatep99 latency spikes every few seconds, CPU usage graph shows only 40% of the limit.Advanced