in istio, how a virtualservice defined in a namespace can use a gateway defined in another namespace in istio, how a virtualservice defined in a namespace can use a gateway defined in another namespace kubernetes kubernetes

in istio, how a virtualservice defined in a namespace can use a gateway defined in another namespace


If it´s not in the same namespace as virtual service, you have to specify that in virtual service

Check the spec.gateways section

apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata:  name: bookinfo-Mongo  namespace: bookinfo-namespacespec:  gateways:  - some-config-namespace/my-gateway # can omit the namespace if gateway is in same                                       namespace as virtual service.

apiVersion: networking.istio.io/v1alpha3kind: Gatewaymetadata:  name: my-gateway  namespace: some-config-namespace

There is related istio documentation about that.