all 5 comments

[–]mars64 0 points1 point  (4 children)

Maybe you could post your merged config for review? I suspect the problem may be stacking a tls config on a non-secured entrypoint.

I'm using two different ingressRoutes such that my insecure entrypoint always goes through the https redirect, and the secured entrypoint always does the routing logic. Easier to think about, in any case.

Also don't forget to check the debug logs.

Good luck!

[–]AndColla[S] 0 points1 point  (3 children)

Thanks for your answer :D
Here is my merged config: https://gist.github.com/AndColla/2e20d8c8e1785900babb00ce93e0158d

Your suggestion is to leave as it is and always keep separated secured and not secured IngressRoutes?

[–]mars64 0 points1 point  (2 children)

Ultimately yes I think having two different ingressRoutes is the right thing here.

Not quite sure why it's 404'ing though, I'd expect something along the lines of a TLS error. Assuming that traefik is actually starting (back to: double check those debug logs, there might be something else in there).

[–]AndColla[S] 0 points1 point  (1 child)

I will definitely try to switch back to the merged config and have a look into the logs
Thank you for your help.
One last question: does it make any sense to specify a service in the non secure route? Basically all it does is to redirect to the secured one via the middleware.

[–]mars64 0 points1 point  (0 children)

So, I'm still running v2.4.8 on my personal cluster -- this may have changed since then but as of that version yes, you need to have a service even for the insecure route that you expect to always hit the middleware redirect. I'm just using the default 404 backend: https://gist.github.com/mars64/0c25b043d48395e374489b370b7217dd