gRPC client returns `transport: authentication handshake failed: x509: certificate is valid for ingress.local, not api.example.com`.
AdvancedTroubleshootingTLS and certificate errors
Answer
Likely causes → The ingress controller returns its default fake certificate because no Ingress/TLS secret matches the SNI, or the TLS secret is in the wrong namespace.
Diagnose →
kubectl get ingress -A -o wide | grep api.example.com
kubectl describe ingress api -n app # TLS section, secret name
kubectl get secret api-tls -n app
Fix → Put the TLS Secret in the Ingress's namespace and list the host under spec.tls.hosts. For gRPC on ingress-nginx also set nginx.ingress.kubernetes.io/backend-protocol: "GRPC".
Prevent → Alert when the controller serves its default certificate (synthetic check on the issuer).
More on TLS and certificate errors
`curl: (60) SSL certificate problem: certificate has expired`Beginner`curl: (60) SSL certificate problem: unable to get local issuer certificate`Beginner`SSL: no alternative certificate subject name matches target host name 'api.example.com'`BeginnerSome clients get the wrong certificate (another site's) from a shared IP.Intermediate`SSL routines::sslv3 alert handshake failure` from `openssl` or curl.IntermediatePython `requests` fails with `SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain`.Beginner