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

The probe is configured for an HTTPS endpoint and fails with `http: server gave HTTP response to HTTPS client`.

BeginnerTroubleshootingResources, OOM, probes and termination
Answer

Likely causes → Scheme mismatch. The probe uses scheme: HTTPS but the port serves plain HTTP (or the reverse gives 400 Bad Request / malformed HTTP response).

Diagnose →

kubectl get pod api-x -o jsonpath='{.spec.containers[0].readinessProbe.httpGet}'
kubectl exec api-x -- wget -qSO- http://localhost:8443/healthz

Fix → Match the scheme to the port. Note the kubelet does not verify TLS certificates for HTTPS probes, so a self-signed cert is fine.

Prevent → Serve health endpoints on a dedicated plain-HTTP management port.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, OOM, probes and termination