When I use a Kubernetes IngressRoute object that lacks a "spec.tls.secretName" field, Traefik refuses to route requests to the backend servers, responding to requests with HTTP status code 404. If I populate the "spec.tls.secretName" field, Traefik does route the requests to the backend servers.
Here are the pertinent manifests, attempting to capture requests below the /dashboard path, stripping that prefix, and routing the requests to servers selected by the myns/mysvc Kubernetes Service.
My dynamic Traefik configuration specifies a default server certificate. I have confirmed that Traefik uses that certificate. I also have the "serversTransport.insecureSkipVerify" field set to true in my static configuration, to allow Traefik to talk to my upstream proxy targets without necessarily needing to trust those servers.
I've tried omitting the "tls" field entirely in the IngressRoute. Doing so also yields a 404 response. Is it possible to have Traefik route to servers with an IngressRoute object like this, but without specifying a certificate to use? I'd like to have Traefik use a default server certificate to terminate TLS, inspect the URL, and route to my servers, most of which will also use HTTPS.
Thanks for pointing that out. I started with the empty "secretName" field, then worked back up the tree, seeing what still produced a working route. Interestingly, Traefik (really, the Go YAML parsing library) doesn't complain about parsing those documents.
It surprised me that setting the "spec.routes.serivces.scheme" field to "https" wasn't enough to convince Traefik to serve this route over HTTPS, but I guess that's just telling it what to use in between the proxy and the backend server, and not telling it how to serve the proxy front end.
Is it correct, then, that the intended design is that an IngressRoute indicates that it wishes to be served over HTTPS by including a "spec.tls" field, and if it doesn't include that field, then it's indicating that HTTP will suffice?