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
Support query matcher for kubernetes ingress #3840
Comments
Hello @gugu91, Thanks for your interest in Traefik! Unfortunately routing on non-path options is not something that is supported by the Kubernetes Ingress Spec (https://kubernetes.io/docs/concepts/services-networking/ingress/). You are correct, in that Traefik can route via query strings, headers, and many other request components, but attempting to implement those routing rules into an ingress environment is not easy or ideal, as the interactions would be totally "custom" and not standardized to any spec. The other major request is routing based on request headers, which is also absent from the ingress spec. Unfortunately the only suggestion I can offer is to run a double proxy setup, with 3 instances of traefik, 2 as ingress controllers (with different labelselectors), and then run an instance of traefik with a static config routing based on query string to your appropriate ingress controllers. This may be able to accomplish what you want. The other option would be to use the Hopefully these options will work for you. Thanks again! |
Hi @dtomcej,
and setting up my ingress to do a path match on mvt/something? |
Yes, that could work, and you could use Make sure you check out (https://docs.traefik.io/configuration/entrypoints/#rewriting-url) for some pointers on syntax, in case you get unexpected results. |
Would this result in a 302 though? |
We would like to use traefik to route based on query string parameters (even a single one) over a k8s cluster. We would like to use a k8s ingress to configure this, as the services we would route to would be changing quite often (this would all be part of an A/B testing strategy)
From this line here: https://github.com/containous/traefik/blob/master/provider/kubernetes/kubernetes.go#L541 it looks like this is not supported.
Query matcher is part of the project itself, so was wondering if it would be a huge amount of work to support it. Also interested if you guys would see a PR supporting this in line with your objectives
The text was updated successfully, but these errors were encountered: