title: IstIO egress gateway gives HTTP 503 error
body: <p>I have the following manifest for deploying a IstIO egress gateway routing:</p>
  
  <pre><code>---
  apiVersion: networking.istio.io/v1alpha3
  kind: ServiceEntry
  metadata:
    name: REDACTED-egress-se
  spec:
    hosts:
    - sahfpxa.REDACTED
    ports:
    - number: 8080
      name: http-port
      protocol: HTTP
    resolution: DNS
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: Gateway
  metadata:
    name: sahfpxa-REDACTED-egress-gw
  spec:
    selector:
      istio: egressgateway
    servers:
    - port:
        number: 8080
        name: http
        protocol: HTTP
      hosts:
      - sahfpxa.REDACTED
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: DestinationRule
  metadata:
    name: egressgateway-for-sahfpxa-REDACTED
  spec:
    host: istio-egressgateway.istio-system.svc.cluster.local
    subsets:
    - name: sahfpxa
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    name: direct-sahfpxa-REDACTED-through-egress-gateway
  spec:
    hosts:
    - sahfpxa.REDACTED
    gateways:
    - REDACTED/REDACTED-egress-gw
    - mesh
    http:
    - match:
      - gateways:
        - mesh
        port: 8080
      route:
      - destination:
          host: istio-egressgateway.istio-system.svc.cluster.local
          subset: sahfpxa
          port:
            number: 80
        weight: 100
    - match:
      - gateways:
        - REDACTED/sahfpxa-REDACTED-egress-gw
        port: 8080
      route:
      - destination:
          host: sahfpxa.REDACTED
          port:
            number: 8080
        weight: 100
  
  </code></pre>
  
  <p>But I get a connection refused from the sidecar istio-proxy container Pod of the affected namespace and a HTTP 503 error from the workload container in that namespace.</p>
  
  <p>Any ideas what could be wrong with the configuration or how I can debug it?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Best regards,
  rforberger</p>