-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traefik provides default TLS certificate instead of one from a secret #10793
Comments
Update. Seems there is routing problem when using websecure endpoint. I tried to test a certificate itself. Therefore I switched from IngressRoute to IngressRouteTCP to be able to use TLS passthrough. But it appeared that routing doesn't work when I try to use IP-address: If I use apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: test-nginx-ingressroute
namespace: test
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- web
- websecure
routes:
- match: HostSNI(`*`)
services:
- name: test-nginx
port: 443
tls:
passthrough: true So, the problem still persists. As I understand, Traefik doesn't route https traffic correctly with IngressRoute |
Ah, I can't use IP-address with HostSNI. But at least I see that the certificate is fine and routing works for http traffic and using |
Hello @ostapkostyk, Thanks for reaching out! |
Hello nmengin, Sorry if I didn't understand something or missed something, but my intestion wasn't to post a question here, rather to point that Traefik doesn't work correctly. If you see that this is not a bug but rather my configuration is wrong, could you point me where I'm wrong? To my understanding, Traefik doesn't mach TLS certificate in case I use IP SANs in the certificate and Host rule in IngressRoute. |
Hello @ostapkostyk, Let's reopen the issue, maybe we were mistaken at first when understanding that it was a question about TLS configuration.
The problem you are facing is not related to HTTP, the TLS termination happens before the request to be sent, and the IngressRoute is not in cause.
This error log states that the default certificate is served because of an empty server name in the client hello. What is the use case you are trying to achieve? Could you please elaborate? |
I thought I was the only one experiencing this issue. I've been burnt out from trying different configurations, and I keep coming to the same conclusion. In my case, I can successfully issue a certificate, but only for the Traefik Dashboard using However, all other services deployed with an Ingress Route don't get issued a certificate, despite having a valid and successfully issued certificate for the hostname and namespace from ACME. In the Traefik Dashboard, I can see that my test Nginx server has a web secure entry point with a TLS certificate from Let's Encrypt. But when I run openssl s_client -connect nginx.local.lab.tech:443, it indicates that the certificate is self-signed and not from Let's Encrypt. I tested this with both staging and production ACME servers. My Environment:
|
Hello @rtribotte,
Thanks, this explains the behavior quite clearly. My usecase: Technical configuration What I tried:
The IP address in the IngressRoute for matching is from the host network, it's not an IP from kubernetes environment. Actually, this IP comes from MetalLB load-balancer. Thank you for your interest to this issue! If you need manifests, I'll be happy to provide them on request. |
Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.I have to close this one because of its lack of activity 😞Feel free to re-open it or join our Community Forum. |
Welcome!
What did you do?
In kubernetes cluster I configured IngressRoute to secure communication with simple nginx server using tls certificate already issued.
The secret exists in the same namespace, here is description from kubectl:
Note that CN and SANs are valid, secret type is correct, certificate is present.
Routing itself works well if I remove tls part and use
web
entryPoint.Here is certificate info (from the secret):
What did you see instead?
Traefik serves it's default TLS certificate.
No entries in traefik logs (Warn level)
What version of Traefik are you using?
3.0.1
What is your environment & configuration?
Add more configuration information here.
If applicable, please paste the log output in DEBUG level
The text was updated successfully, but these errors were encountered: