Multiple levels of path in Ingress?

240 views
Skip to first unread message

se...@mitchwood.com

unread,
Jul 11, 2017, 10:51:54 AM7/11/17
to Kubernetes user discussion and Q&A
I'm trying to understand how to expose services/applications with ingress under multiple path levels. From all the docs I can find it seems that every ingress must exist at the top level under /

Currently in production we have UI webapps under /ui and various web services under /api:

/ui/admin/users <-- user admin UI
/ui/admin/products <-- product admin UI

/api/v1/users <-- old users WS
/api/v2/user <-- new users WS
/api/v1/product <-- current products WS

I have tried to use an ingress like this:

spec:
rules:
- http:
paths:
- path: /ui/admin/users
backend:
serviceName: users-admin
servicePort: 80

but it seems that is not supported (works fine with path: ui-admin-users but that's not what we're after).

Am I missing something obvious or do I need to write some sort of proxy service and map paths to it?

se...@mitchwood.com

unread,
Jul 11, 2017, 12:05:07 PM7/11/17
to Kubernetes user discussion and Q&A, se...@mitchwood.com
On Tuesday, 11 July 2017 10:51:54 UTC-4, se...@mitchwood.com wrote:

> I'm trying to understand how to expose services/applications with ingress
> under multiple path levels. From all the docs I can find it seems that
> every ingress must exist at the top level under /

Okay... the path as I specified is fine... I was misinterpreting the error. Turns out I needed to add a rewrite so that the request came in as the application was expecting.

Works fine now.

Reply all
Reply to author
Forward
0 new messages