ok, thanks for the info On Sat, Apr 28, 2018 at 2:31 PM, 'Tim Hockin' via Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> wrote:
> Ingress is sort of the lowest-common-API across many platforms. I am not > sure that the majority of them can support it natively. I think it's > logical, but may not be practical yet. > > On Sat, Apr 28, 2018, 7:41 AM Kanthi P <pavuluri.kan...@gmail.com> wrote: > >> ohk Tim. Does it sound like a good thing to add? >> >> Let me share our usecase. We are building a datascience platform using >> kubernetes. >> >> We have datascience app which uses tensorflow internally, this runs as a >> service in kubernetes cluster. >> And we configured ingress controller for this service. >> >> Tensorflow has a dashboard called Tensorboard that shows some >> metrics/data about the datascience application performance. >> While the tensorboard UI is hosted at <host>/, the data it tries to fetch >> reside at <host>/data >> >> After configuring ingress, we can see the tensorboard dashboard since >> <host>/<app> gets redirected to <host>/ as expected. >> But it fails to load the data as <host>/<app>/data also gets redirected >> as <host>/ >> >> If we can add the support for such URL manipulation, it will help similar >> usecases. Thoughts? >> >> Thanks, >> Kanthi >> >> >> >> >> On Saturday, April 28, 2018 at 11:38:24 AM UTC+5:30, Tim Hockin wrote: >>> >>> Ingress does not do prefix stripping or URL munging by default, as not >>> all platforms support it. I verified against the Google implementation, it >>> passes the URL path through directly. >>> >>> On Sat, Apr 28, 2018, 6:09 AM Kanthi P <pavulur...@gmail.com> wrote: >>> >>>> Thanks David for the example. I tried it, with this we can only >>>> redirect /test/data to /data, but we won't be able to redirect /test to /. >>>> >>>> We actually want /test to remain redirected to / itself and /test/data >>>> to redirect to /data and /test/data/runs to /data/runs and so on. >>>> >>>> So in short, we just want /test/* to be redirected to /*. >>>> >>>> Is there any provision for such wildcard match kind of thing? >>>> >>>> Thanks much, >>>> Kanthi >>>> >>>> >>>> On Saturday, April 28, 2018 at 2:08:14 AM UTC+5:30, David Rosenstrauch >>>> wrote: >>>>> >>>>> If you were using the nginx ingress, you would do it like this: >>>>> >>>>> apiVersion: extensions/v1beta1 >>>>> kind: Ingress >>>>> metadata: >>>>> name: test-ingress >>>>> annotations: >>>>> nginx.ingress.kubernetes.io/rewrite-target: /data >>>>> nginx.ingress.kubernetes.io/ssl-redirect: "false" >>>>> spec: >>>>> rules: >>>>> - http: >>>>> paths: >>>>> - path: /test/data >>>>> backend: >>>>> serviceName: test >>>>> servicePort: 6006 >>>>> >>>>> (See: >>>>> https://github.com/kubernetes/ingress-nginx/tree/master/ >>>>> docs/examples/rewrite) >>>>> >>>>> But I'm not sure how you'd do it using traefik. (And I don't think >>>>> the >>>>> standard k8s ingress controller supports rewrite.) >>>>> >>>>> HTH, >>>>> >>>>> DR >>>>> >>>>> On 04/27/2018 03:11 PM, Kanthi P wrote: >>>>> > Hi, Need some help with ingress controller >>>>> > we want to redirect a http request say <host>/<path>/xyz to be >>>>> mapped to a >>>>> > service in the backend. And the service should receive the request >>>>> as >>>>> > <host>/xyz >>>>> > How do we annotate this in the ingress resource? >>>>> > >>>>> > Have configured the ingress resource as shown: >>>>> > >>>>> > >>>>> > apiVersion: extensions/v1beta1 >>>>> > kind: Ingress >>>>> > metadata: >>>>> > annotations: >>>>> > kubernetes.io/ingress.class: traefik >>>>> > name: test-ingress >>>>> > namespace: default >>>>> > >>>>> > spec: >>>>> > rules: >>>>> > - http: >>>>> > paths: >>>>> > - backend: >>>>> > serviceName: test >>>>> > servicePort: 6006 >>>>> > path: /test >>>>> > status: >>>>> > loadBalancer: {} >>>>> > >>>>> > But the problem is <host>/test/data gets redirected as <host>/, but >>>>> we want >>>>> > it to be redirected as <host>/data >>>>> > Any idea how to annotate this? >>>>> > >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Kubernetes user discussion and Q&A" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to kubernetes-use...@googlegroups.com. >>>> To post to this group, send email to kubernet...@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/kubernetes-users. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Kubernetes user discussion and Q&A" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to kubernetes-users+unsubscr...@googlegroups.com. >> To post to this group, send email to kubernetes-users@googlegroups.com. >> Visit this group at https://groups.google.com/group/kubernetes-users. >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.