Hello,
Is it possible to handle ingress routes with the same host that share a base path? In the example below the common base-path is “/”
For example, I have a web app on the root ingress like:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kong-ingress-web-app
annotations:
kubernetes.io/ingress.class: "kong"
spec:
rules:
- http:
host: example.com
paths:
- path: "/"
backend:
serviceName: {{ .Release.Name }}-app
servicePort: 80
And then I want to host the api at /api like this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kong-ingress-web-api
annotations:
kubernetes.io/ingress.class: "kong"
spec:
rules:
- http:
host: example.com
paths:
- path: "/api"
backend:
serviceName: {{ .Release.Name }}-api
servicePort: 80
Both endpoints have plugins tied to them so they need to be separete ingress’, and they will be public with TLS (which is one reason why the hosts need to be the same).
All my “/api” routes work as expected until i add the “/” route ingress and then they stop working. Any way to force literal path checking? Or is there a better way to design this?
If i set the app as the fallback service, everything works as expected… Hmm, perhaps that is ok
Thanks,
Ben