A JVM app is killed during startup with `Liveness probe failed` before it ever becomes ready; startup takes about 90 seconds.
IntermediateTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → Liveness starts checking after initialDelaySeconds and kills the container before the app finishes booting. The container restarts and boots again forever.
Diagnose →
kubectl describe pod api-x | grep -E 'Liveness|Started|Killing'
kubectl logs api-x --previous | grep -i 'started in'
Fix → Use a startup probe. Liveness and readiness are disabled until it succeeds:
startupProbe:
httpGet: {path: /livez, port: http}
periodSeconds: 5
failureThreshold: 36 # up to 180s to start
Prevent → Every slow-starting service gets a startup probe sized to its worst-case boot time, not a large initialDelaySeconds.
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