Q: A new Envoy config rollout silently broke mTLS between edge and mesh. What’s your RCA trace?
End-to-end diagnostic RCA runbook for troubleshooting a silent mTLS handshake failure between an edge Ingress Gateway and internal mesh sidecars following a configuration rollout.
UC - Upstream Connection Termination) when routing to internal mesh services. The edge proxy logs show connection resets, while backend services report no incoming HTTP requests. The failure is silent because standard health checks bypass mTLS, leaving the control plane falsely reporting all pods as healthy."
Want to master this scenario in a live sandbox? The Linux Foundation's Prometheus Certified Associate (PCA) & Monitoring Labs covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: During a routine mesh configuration rollout, an edge Ingress Gateway begins throwing intermittent 503 Service Unavailable errors (UC - Upstream Connection Termination) when routing to internal mesh services. The edge proxy logs show connection resets, while backend services report no incoming HTTP requests. The failure is silent because standard health checks bypass mTLS, leaving the control plane falsely reporting all pods as healthy.
Inspect Envoy Access Log Response Flags
Decode the exact Envoy response flag from the ingress gateway access logs:
kubectl logs -l app=istio-ingressgateway -n istio-system --tail=100 \
| jq -r '.response_flags, .upstream_cluster, .downstream_peer_cert, .response_code'
- Response Flag UC: Upstream Connection failure before request completion, strongly indicating TLS handshake failure.
- Response Flag UF: Upstream connection Failure (connection reset during handshake or certificate rejection).
Verify Secret & SPIFFE Certificate SAN Validation
Compare cryptographic SANs and trust domains between edge and upstream mesh sidecars:
# 1. Inspect Edge Gateway loaded certificates
istioctl proxy-config secret <ingress-pod>.istio-system
# 2. Inspect target service proxy certificates
istioctl proxy-config secret <target-pod>.<namespace>
# 3. Test raw mTLS handshake with OpenSSL s_client using mesh certificates
kubectl exec -it <ingress-pod> -n istio-system -- openssl s_client \
-connect <target-pod-ip>:8443 \
-cert /etc/istio-certs/cert-chain.pem \
-key /etc/istio-certs/key.pem \
-CAfile /etc/istio-certs/root-cert.pem \
-showcerts
- Look for
Verify return code: 19 (self-signed certificate in certificate chain)orcertificate has expired. - Check for SPIFFE identity mismatch: If Ingress Gateway expects
spiffe://cluster.local/ns/prod/sa/paymentbut upstream sends a different trust domain (e.g.cluster.corp), handshake terminates.
Check PeerAuthentication & DestinationRule Conflict
Identify configuration drift between PeerAuthentication (server) and DestinationRule (client):
# Check if server enforces STRICT mTLS while client defaults to DISABLE or PERMISSIVE
kubectl get peerauthentication -A
kubectl get destinationrule -A -o yaml | grep -A 5 "tls:"
Mitigation & Permanent Prevention
Apply immediate traffic remediation and harden future config rollouts:
- Immediate Mitigation: Switch destination rule TLS mode to
ISTIO_MUTUALor temporarily relax PeerAuthentication toPERMISSIVEto restore customer traffic. - Root Cause: Rollout updated Istio DestinationRule without specifying
mode: ISTIO_MUTUAL, causing Ingress to open plaintext HTTP connections to a pod enforcingSTRICTmTLS. - Prevention: Enforce CI validation using
istioctl analyzeand automate pre-merge canary validation of mesh manifests.
- I immediately inspect Envoy access logs for response flags: 'UC' (Upstream Connection termination) and 'UF' point directly to a TLS handshake failure.
- I use 'istioctl proxy-config secret' on both the edge ingress and the upstream pod to verify certificate validity, expiration, and SPIFFE trust domain matching.
- I test the raw TLS handshake directly using openssl s_client inside the pod container to observe the exact TLS alert (e.g. unknown CA, cipher mismatch, or SAN rejection).
- In 90% of cases, the root cause is a desync: an upstream service was set to PeerAuthentication STRICT while the newly rolled-out DestinationRule omitted 'mode: ISTIO_MUTUAL'.
- We mitigate by aligning DestinationRule to ISTIO_MUTUAL and prevent recurrence using 'istioctl analyze' in our GitOps deployment pipeline.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Injecting high-cardinality label dimensions (such as user IDs or request UUIDs) into Prometheus metrics when addressing certificates High-cardinality label values cause exponential time-series growth, consuming gigabytes of TSDB memory and crashing Prometheus servers.
- Evaluating application performance solely through arithmetic mean or p50 latency while ignoring tail latency (p99) Averages hide catastrophic tail latency outages where 1% of high-value user transactions suffer severe timeouts.
- Failing to inject and extract W3C distributed trace context across message brokers and RPC calls Breaking distributed trace context propagation fragments end-to-end transaction waterfalls into disconnected, un-correlatable trace segments.
- Configuring alert rule evaluation intervals without sufficient duration damping (for: 5m), inducing alert flap Instant alerts triggered by transient sub-second CPU or latency blips page on-call engineers unnecessarily and dilute response urgency.