Probes fail with `dial tcp 10.0.3.17:8080: connect: connection refused`, but `curl localhost:8080` inside the container works.
IntermediateTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → The app listens on 127.0.0.1 only. The kubelet probes the Pod IP, so a loopback-only listener refuses it. Also common: probe port differs from the actual listen port.
Diagnose →
kubectl debug -it api-x --image=nicolaka/netshoot --target=app -- ss -lntp
# 127.0.0.1:8080 -> wrong, 0.0.0.0:8080 or *:8080 -> right
Fix → Bind to 0.0.0.0 (e.g. --host 0.0.0.0, server.address=0.0.0.0, Flask app.run(host="0.0.0.0")), or fix the probe port. Using a named port (port: http) keeps probe and container port in sync.
Prevent → Container ports and probes reference named ports; base images configured to bind all interfaces.
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