Tekton step "OOMKilled" (exit 137) in CI
The step container tried to use more memory than its limit allowed, so the kernel OOM killer terminated it. Tekton reports the step as terminated with reason OOMKilled and exit code 137.
What this error means
A TaskRun step is terminated with reason OOMKilled; kubectl describe pod shows "Last State: Terminated, Reason: OOMKilled, Exit Code: 137".
Last State: Terminated
Reason: OOMKilled
Exit Code: 137Common causes
The memory limit is below what the step needs
A build or test step (compiler, node, JVM) needs more memory than the step or stepTemplate limit allows, so it is killed.
A quota-derived default limit is too low
A LimitRange in the namespace injected a default memory limit that is smaller than the workload requires.
How to fix it
Raise the step memory limit
Set a computeResources limit large enough for the step's peak usage.
steps:
- name: build
image: node:20
computeResources:
requests:
memory: 1Gi
limits:
memory: 4GiCap the tool's own memory use
For the JVM or Node, cap heap size so it stays under the container limit instead of being killed.
env:
- name: NODE_OPTIONS
value: --max-old-space-size=3072How to prevent it
- Set memory limits from observed peak usage, not guesses.
- Cap JVM/Node heap below the container limit.
- Check namespace LimitRange defaults are large enough for CI steps.