Interview Prep/Kubernetes/Resources, OOM, probes and termination

A Job's main container finished successfully, but the Job never completes because the Pod stays `1/2 Running`.

IntermediateTroubleshootingResources, OOM, probes and termination
Answer

Likely causes → A classic sidecar (Istio proxy, Cloud SQL proxy, log shipper) as a regular container keeps running, so the Pod never terminates and the Job never succeeds.

Diagnose →

kubectl get pod migrate-x -o jsonpath='{range .status.containerStatuses[*]}{.name}{" "}{.state}{"\n"}{end}'

Fix → Declare the sidecar as a native sidecar (init container with restartPolicy: Always); the kubelet stops it after the main container exits. For Istio, enable native sidecars or call curl -X POST localhost:15020/quitquitquit at the end of the job script.

Prevent → Use native sidecars for all Jobs on Kubernetes 1.29+.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, OOM, probes and termination