TLS Error Cloudflared -> Traefik -> Service on Kubernetes

TLDR: Are there any security concerns to just using "invalid" tls certs internally to a cluster? Is there any way to tell the tunnel to check if the tls matches the external hostname of a service not the internal?

I have a k8s cluster with no load balancer. I intend to use a cloudflare tunnel to expose traefik to the internet.

I plan to use traefik to reverse proxy the services to expose.

I have a wildcard tls cert for the external hostnames of the services.

If I disable TLS verification everything works perfectly.

When I try to enable tls verification it fails because the certificate traefik is serving does not match the internal hostname. It matches the external hostname.

2024-08-17T11:41:53Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: tls: failed to verify certificate: x509: certificate is valid for foo.example.com, not traefik.traefik" connIndex=3 dest=https://foo.example.com event=0 ip=<Redacted> type=http
SPOILER_image.png
Was this page helpful?