<p>If a <code>virtualservice</code> <code>A</code> is defined in <code>namespace</code> <code>A</code> using <code>networking.istio.io</code>, how can it use a <code>gateway</code> <code>B</code> defined in another namespace, <code>namespace</code> <code>B</code>?</p>

<p>Thanks</p>

imriss
<p>If it´s not in the same namespace as virtual service, you have to specify that in virtual service  </p>

<p>Check the <code>spec.gateways</code> section</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo-Mongo
  namespace: bookinfo-namespace
spec:
  gateways:
  - some-config-namespace/my-gateway # can omit the namespace if gateway is in same
                                       namespace as virtual service.
</code></pre>

<hr>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
  namespace: some-config-namespace
</code></pre>

<p>There is related  <a href="https://istio.io/docs/reference/config/networking/gateway/" rel="noreferrer">istio documentation</a> about that.</p>
