Interview Prep/Jenkins/Plugins, JCasC & Kubernetes agents

Build fails with `Container [maven] was terminated (Exit Code: 137, Reason: OOMKilled)`

IntermediateTroubleshootingPlugins, JCasC & Kubernetes agents
Answer

Likely causes → The container's memory limit is lower than the JVM or test suite needs; JVM heap not bounded within the container limit.

Diagnose → kubectl describe pod (Last State: OOMKilled); check MAVEN_OPTS and container limits.

Fix → Raise the memory limit and set MAVEN_OPTS=-XX:MaxRAMPercentage=75 so the JVM respects it; limit Surefire forks (-DforkCount=1).

Prevent → Right-size requests/limits per template from observed usage.

All Jenkins questions Roadmap: Jenkins

More on Plugins, JCasC & Kubernetes agents