OOMKilled and exit code 137
A container killed with OOMKilled and exit code 137 used more memory than its limit. Confirm it in describe, then fix the leak or raise the limit.
What you see
Last State: TerminatedReason: OOMKilledExit Code: 137- A rising
Restart Count
What it means
Memory limits are enforced by the Linux kernel with out-of-memory kills. When a container uses more than its memory limit, the kernel may terminate it. The docs add that this only happens when the kernel sees memory pressure, so an over-allocating container is not always killed immediately.
CPU works differently. A container that hits its CPU limit is throttled, not killed.
How to confirm the cause
- 1Check why the container last stopped
kubectl describe pod POD_NAME
Example from the official docs
Last State: Terminated Reason: OOMKilled Exit Code: 137
This is the shape shown in the Kubernetes docs.
Restart Countshows how often it has happened. - 2Read just the termination message
kubectl get pod POD_NAME -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}"From the docs page on determining the reason for pod failure.
Causes and fixes
Memory leak or growth in the app
- HOW TO TELL
- Memory use climbs steadily until the kill, then resets after the restart.
- FIX
- Find the leak in the application code. Raising the limit only delays the next kill.
Limit set too low for normal use
- HOW TO TELL
- The app is healthy but is killed soon after it reaches its normal working set.
- FIX
- Raise the memory limit (and usually the request) to fit measured usage. The docs suggest doing this once you have checked that the app behaves as expected.
How to stop it coming back
- Set requests and limits from measured usage over a normal peak.
- Alert on restart counts and on memory use close to the limit.
- Load test before you set the limit in production.
Keep going
- Runbook: CrashLoopBackOff: the container keeps crashing
- Runbook: Pods evicted by node pressure (MemoryPressure, DiskPressure, PIDPressure)
- Cheat sheet: kubectl
- Lesson: the kubernetes topic in Learn
Sources
- Kubernetes docs: Resource management, My container is terminated
- Kubernetes docs: Determine the reason for pod failure
Kubernetes documentation (kubernetes.io), read 18 Nov 2026. The docs version selector listed v1.33 to v1.37.