"Browsers are showing the Kubernetes Ingress Controller Fake Certificate — what is wrong?" You added TLS to Ingress shop in namespace shop: spec.tls lists shop.example.com with secretName: shop-example-tls. kubectl get secret shop-example-tls -A finds the Secret only in namespace cert-manager, type kubernetes.io/tls. What is going on?
- The Ingress needs the
ssl-redirectannotation before the controller will terminate TLS. ssl-redirect only controls the HTTP-to-HTTPS redirect; termination is configured by the tls section and its Secret. - The Secret type is wrong; Ingress TLS requires an
OpaqueSecret withcertandkeyentries.kubernetes.io/tlswithtls.crtandtls.keyis exactly the required shape; the type is right and the namespace is wrong. - The Secret must live in the Ingress's namespace: the controller looks up
shop/shop-example-tls, finds nothing, logsError obtaining X.509 certificate, and serves its default certificate for that host. Issue or copy the certificate intoshop. Ingress TLS references are namespace-local by name; a Secret in another namespace is invisible to this Ingress, and the fallback is the controller's self-signed default. - TLS Secrets must be in the controller's namespace so it can read them; move it to
ingress-nginx. The controller has RBAC to read Secrets cluster-wide, but the API contract binds an Ingress to Secrets in its own namespace; the controller's namespace is irrelevant.
The TLS Secret must be in the Ingress's own namespace (shop); the controller cannot see it in cert-manager, so it serves its default certificate.
The controller resolves spec.tls[].secretName as <ingress namespace>/<name>, loads tls.crt and tls.key, and registers the certificate for the listed hosts so SNI can select it. A missing or unreadable Secret leaves the host without a certificate, and the controller serves its default self-signed one rather than refusing the handshake. The interview signal is knowing the namespace rule and reaching for the controller log and openssl s_client -servername as evidence instead of guessing at annotations.
Moving the Secret into the controller's namespace, or blaming the Secret type or a missing ssl-redirect annotation. The controller can read Secrets everywhere; the API binds an Ingress to Secrets in its own namespace only.