Currently have Istio deployed to handle the ingress to my applications. Running into an issue where one app needs to be reachable via a certain URL such as "http://gateway/webapp1" and I need it to route internally to: server-name1:8080/some/odd/name/path
The current match statement I have is:
- match:
- uri:
prefix: /webapp1
route:
- destination:
host: server-name1
port:
number: 8080
I am unable to figure out how to expand on the destination route to tell it to hit a different endpoint that just server-name1:8080. Is there a simple way to add a prefix to the underlying route/destination? Thank you.
You can use the HTTP rewrite with the virtual service before sending traffic further
Read more at official document : https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRewrite