<p>Is ISTIO internal traffic routing to different versions possible even when I use custom gateways? (Azure App gateway). Below is my use case. I have two different versions of deployments (Kubernetes) with the labels <code>app:myapp</code> &amp; <code>version: v1</code> and <code>version: v2</code> [v1 label for one deployment and v2 label for another]. The traffic is currently evenly distributed between these two and the same can be seen in kiali dashboard too. I want to route traffic only to <code>v2</code>. Below are my virtual service and destination rules. </p>

<p><strong>VIRTUAL SERVICE:</strong></p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: myvirtualservice
  namespace: mynamespace # Use same namespace with backend service
spec:
  hosts:
  - myservice.namespace.svc.cluster.local
  ingress:
  - appgw # define ingress name
  http:
  - match:
    - uri:
        prefix: "/"
    route:
    - destination:
        port:
          number: 80 # Backend service port
        host: myservice.namespace.svc.cluster.local # Backend service name
        subset: v2
</code></pre>

<p><strong>DESTINATION RULE:</strong></p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: mydestrule
spec:
  host: myservice.namespace.svc.cluster.local
  subsets:
  - name: v2
    labels:
      version: v2
</code></pre>

<p>Currently in the kiali dashboard too my azure ingress gateway is shown as "unknown" resource. </p>

vishal
<p>If I see it correctly you are missing the subset selector in the Destination of the VirtualService.
If you configure the VirtualService like this it should work better:</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: myvirtualservice
  namespace: mynamespace # Use same namespace with backend service
spec:
  hosts:
  - myservice.namespace.svc.cluster.local
  ingress:
  - appgw # define ingress name
  http:
  - match:
    - uri:
        prefix: "/"
    route:
    - destination:
        port:
          number: 80
        host: myservice.namespace.svc.cluster.local 
        subset: v2 # &lt;- Route to the subset v2 and enable endpoint select by label
</code></pre>

<p>See <a href="https://istio.io/docs/reference/config/networking/virtual-service/#Destination" rel="nofollow noreferrer">https://istio.io/docs/reference/config/networking/virtual-service/#Destination</a></p>
