unable to deploy microservices with different endpoint patterns using kubernetes ingress

4/22/2020

I'm trying to deploy a bunch of microsrvices under a single ingress contoller (in a k8s cluster). For some of these apps the ingress requires a rewrite annotation in the ingress definition like this: nginx.ingress.kubernetes.io/rewrite-target: /$2 and some of them do not use any rewrite annotation and are defined via a specific path.

Both apps are using the same host but different paths:

app1 uses - path: /foo/?(.*)

app2 uses - path: /bar

I can get these working seperately but not together. (with rewrite annotation the first set of apps are redirected correctly and without annotation only the second set of apps work)

I also tried creating different ingress definitions for different set of apps with required nginx configuration which also did not help.

Any thoughts please?

-- SBG
kubernetes
kubernetes-helm
kubernetes-ingress
nginx

1 Answer

4/23/2020

I was able to get away with this by creating another ingress in a different namespace.

-- SBG
Source: StackOverflow