Updated on 2025-04-25 GMT+08:00

Redirection

If the redirection option is enabled, requests are redirected to a new destination address.

Configure the YAML file as follows:

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings.prod.svc.cluster.local
  http:
  - match:
    - uri:
        exact: /v1/getProductRatings
    redirect:                           # Configure redirection parameters.
      uri: /v1/bookRatings
      authority: newratings.default.svc.cluster.local

You can configure the parameters based on site requirements.