apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: helloworld-vs
spec:
  hosts:
    - "*"
  gateways:
    - helloworld-gateway
  http:
    - name: helloworld
      match:
        - uri:
            exact: /helloworld
      route:
        - destination:
            host: helloworld.default.svc.cluster.local
            port:
              number: 80
      rewrite:
        uri: "/"
    - name: default
      directResponse:
        status: 404
        body:
          string: "Page Not Found"
      headers:
        response:
          set:
            content-type: "text/plain"