<p>I encountered the same error. The Service port needed a name added to it. <a href="https://github.com/istio/istio/issues/19966" rel="nofollow noreferrer">https://github.com/istio/istio/issues/19966</a>. Make sure your <em>beta-optimus</em> service port has a name. </p>

<p><a href="https://istio.io/docs/ops/deployment/requirements/" rel="nofollow noreferrer">https://istio.io/docs/ops/deployment/requirements/</a></p>

<pre><code>ports:
    - name: https # Use http or https
       protocol: TCP
       port: 8080
       targetPort: 8080
</code></pre>

CC BY-SA 4.0
2020-03-02T03:45:31.020Z
I already have named the port, the issue is that this is golang application and internally it uses grpc for communication.
kapil gupta
CC BY-SA 4.0
2020-02-28T22:11:32.387Z
2020-03-02T16:42:25.910Z
2020-03-02T16:42:25.910Z
leo
<p>I am deploying a virtual service and gateway but when I run it on browser get the below error: </p>

<p><strong>upstream connect error or disconnect/reset before headers. reset reason: connection failure</strong></p>

<p>I deployed with helm chart and the result of dry run is below for virtual service and gateway:</p>

<pre><code># Source: beta-optimus/templates/gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: beta-api-dev-gateway
spec:
  selector: 
      istio: ingressgateway
  servers: 
    - port:
         number: 443
         name: https
         protocol: HTTP
      hosts: 
         - "*.myapp.xyz"
---
# Source: beta-optimus/templates/virtualService.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: beta-api-dev
spec:
  hosts:
    - "beta-api-dev.myapp.xyz"
  gateways: 
    - beta-api-dev-gateway
  http:
    - route:
         - destination: 
               host: beta-optimus

</code></pre>

<p>the beta-optimus is running on 2 pods fine.
I am using AWS so I made entry into Route53 for the proposed URL with istio. My other deployments work fine, but getting the error only in this one.</p>

<kubernetes><istio>
upstream connect error or disconnect/reset before headers. reset reason: connection failure
kapil gupta
# upstream connect error or disconnect/reset before headers. reset reason: connection failure

(Asked by: username_0 on 2020-02-26)

I am deploying a virtual service and gateway but when I run it on browser get the below error: 
upstream connect error or disconnect/reset before headers. reset reason: connection failure
I deployed with helm chart and the result of dry run is below for virtual service and gateway:
# Source: beta-optimus/templates/gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: beta-api-dev-gateway
spec:
  selector: 
      istio: ingressgateway
  servers: 
    - port:
         number: 443
         name: https
         protocol: HTTP
      hosts: 
         - "*.myapp.xyz"
---
# Source: beta-optimus/templates/virtualService.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: beta-api-dev
spec:
  hosts:
    - "beta-api-dev.myapp.xyz"
  gateways: 
    - beta-api-dev-gateway
  http:
    - route:
         - destination: 
               host: beta-optimus


the beta-optimus is running on 2 pods fine.
I am using AWS so I made entry into Route53 for the proposed URL with istio. My other deployments work fine, but getting the error only in this one.

**Tags:** kubernetes, istio


---

## 1 answers

### Answer by username_1 on 2020-02-28. Score: 1

I encountered the same error. The Service port needed a name added to it. https://github.com/istio/istio/issues/19966. Make sure your beta-optimus service port has a name. 
https://istio.io/docs/ops/deployment/requirements/
ports:
    - name: https # Use http or https
       protocol: TCP
       port: 8080
       targetPort: 8080

> **Comments:**
> **username_0**: I already have named the port, the issue is that this is golang application and internally it uses grpc for communication.  

---

