Through Istio, clients get "503 upstream connect error or disconnect/reset before headers. reset reason: connection failure".

IntermediateTroubleshooting5xx errors
Answer

Likely causes → Envoy couldn't connect to the destination pod: the pod is gone but Envoy's endpoint list is stale, mTLS mode mismatch (STRICT on server, client without sidecar), the app listens on localhost only, or the port name/protocol is wrong.

Diagnose →

istioctl proxy-config endpoints deploy/frontend -n prod | grep orders
istioctl analyze -n prod
kubectl get peerauthentication -A
kubectl logs deploy/frontend -c istio-proxy -n prod | grep ' 503 ' | head

The response flags in Envoy access logs (UF, URX, UH) tell you which failure it was.

Fix → Align mTLS policy, have the app bind 0.0.0.0, fix port naming (http-, grpc-), and add a modest retry on connect-failure in the VirtualService.

Prevent → Run istioctl analyze in CI, and roll mTLS STRICT out per namespace with PERMISSIVE first.

All Real-World Interview questions Roadmap: Interview readiness

More on 5xx errors