This is my VirtualService in Istio:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: api-vs
spec:
gateways:
- istio-system/gateway
- mesh
hosts:
- api.xyz.com
http:
- match:
- uri:
prefix: /public/api/booking/
rewrite:
uri: /
route:
- destination:
host: public-api
port:
number: 80
subset: v1
weight: 100
Currently I am able to access my status page using this URL:
https://api.xyz.com/public/api/booking/health
but I want to make the link shorter.
https://api.xyz.com/public/api/booking/health
should be accessible under
https://api.xyz.com/v3/health
So, in theory, /public/api/booking
will become just /v3
. I am not sure how to do this in Istio, I don't want to break the page, I should still be able to see the same page.
I tried to use rewrite function but doesn't work.
Is this possible?
Thanks for your suggestions.