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

Pods are `Running` but `0/1 READY`, and events show `Readiness probe failed: HTTP probe failed with statuscode: 503`.

BeginnerTroubleshootingResources, OOM, probes and termination
Answer

Likely causes → The app's readiness endpoint returns 503: a dependency is unavailable, warm-up not finished, or the endpoint deliberately reports not ready. The Pod is removed from Service endpoints, so it gets no traffic but is not restarted.

Diagnose →

kubectl exec api-x -- wget -qSO- localhost:8080/readyz
kubectl logs api-x | tail -50
kubectl get endpointslices -l kubernetes.io/service-name=api -o wide

Fix → Fix the dependency the endpoint reports, or the endpoint logic. If all replicas depend on one shared dependency, consider whether being unready helps at all; failing open may be better than taking the whole service out.

Prevent → Readiness responses that include the failing check in the body, and alerts on Deployments with unavailable replicas.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, OOM, probes and termination