<p>I try to get some basic routing between 2 apps deployed on a Google Cloud Kubernetes cluster with an lb ratio and I have this config:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: kubeapp
  labels:
    app: kubeapp
spec:
  ports:
  - port: 8080
    name: http
  selector:
    app: kubeapp
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kubeapp-v1
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kubeapp
        version: kubeapp-v1
    spec:
      containers:
      - name: kubeapp-v1
        image: .......
        ports:
        - name: kubeapp-v1
          containerPort: 8080
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kubeapp-v2
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: kubeapp
        version: kubeapp-v2
    spec:
      containers:
      - name: kubeapp-v2
        image: .......
        ports:
        - name: kubeapp-v2
          containerPort: 8080
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: kubeapp-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: kubeapp
spec:
  hosts:
  - "*"
  gateways:
  - kubeapp-gateway
  http:
  - route:
    - destination:
        host: kubeapp
        port: 8080
</code></pre>

<p>which works perfectly and traffic goes 50/50 but when I try to add some basic rules for lb like:</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: kubeapp
spec:
  hosts:
  - "*"
  gateways:
  - kubeapp-gateway
  http:
  - route:
    - destination:
        host: kubeapp
        port:
          number: 8080
        subset: kubeapp-v1
      weight: 90
    - destination:
        host: kubeapp
        port:
          number: 8080
        subset: kubeapp-v2
      weight: 10
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: kubeapp
spec:
  host: kubeapp
  subsets:
  - name: kubeapp-v1
    labels:
      version: kubeapp-v1
  - name: kubeapp-v2
    labels:
      version: kubeapp-v2
</code></pre>

<p>I got <code>upstream connect error or disconnect/reset before headers</code></p>

<p>I've tried to install Istio in all 3 modes and deploy it on different cluster nodes size (I saw that sometimes Istio has some bugs on some specific cluster size) and without success.</p>

Padi
<p>A very common reason for this kind of problem is that your DestinationRule is causing an mTLS conflict. The issue is documented <a href="https://istio.io/help/ops/traffic-management/troubleshooting/#503-errors-after-setting-destination-rule" rel="nofollow noreferrer">here</a>.</p>
