<p>I am trying to enable a deployment in the gateway namespace to send metrics to an external service at <code>engine-report.apollodata.com</code></p>

<p>I have written the following service entry and virtual service rules, as per the <a href="https://istio.io/docs/tasks/traffic-management/egress/" rel="nofollow noreferrer">Istio documentation</a> yet no traffic is able to access the endpoint.</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: apollo-engine-ext
  namespace: {{ .Release.Namespace }}
  labels:
      chart: {{ .Chart.Name }}
      release: {{ .Release.Name }}
      heritage: {{ .Release.Service }}
spec:
  hosts:
  - '*.apollodata.com'
  ports:
  - number: 80
    name: http
    protocol: HTTP
  - number: 443
    name: https
    protocol: HTTPS
  resolution: DNS
  location: MESH_EXTERNAL

---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: apollo-engine-ext
  namespace: {{ .Release.Namespace }}
  labels:
      chart: {{ .Chart.Name }}
      release: {{ .Release.Name }}
      heritage: {{ .Release.Service }}
spec:
  hosts:
  - '*.apollodata.com'
  tls:
  - match:
    - port: 443
      sni_hosts:
      - '*.apollodata.com'
    route:
    - destination:
        host: '*.apollodata.com'
        port:
          number: 443
      weight: 100
</code></pre>

<p>What might be causing this issue</p>

Pegladon
<p>Using the following configuration, the issue was resolved. I'm still unsure as to what was causing the issue. In clarification of some of the comments to my original question. Using the original configuration, it was possible to curl <a href="http://engine-report.apollodata.com" rel="nofollow noreferrer">http://engine-report.apollodata.com</a> and <a href="https://engine-report.apollodata.com" rel="nofollow noreferrer">https://engine-report.apollodata.com</a> endpoints, but as intended through the istio service mesh external endpoints like <a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a> were unavailable.</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: "apollo-engine-ext"
  namespace: {{ .Release.Namespace }}
  labels:
      chart: {{ .Chart.Name }}
      release: {{ .Release.Name }}
      heritage: {{ .Release.Service }}
spec:
  hosts:
  - apollodata.com
  - engine-report.apollodata.com
  - apollographql.com
  location: MESH_EXTERNAL
  ports:
  - number: 443
    name: https
    protocol: HTTPS
  - number: 80
    name: http
    protocol: HTTP
  resolution: DNS

---

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: "apollo-engine-ext"
  namespace: {{ .Release.Namespace }}
  labels:
      chart: {{ .Chart.Name }}
      release: {{ .Release.Name }}
      heritage: {{ .Release.Service }}
spec:
  hosts:
  - apollodata.com
  - engine-report.apollodata.com
  - apollographql.com
  tls:
  - match:
    - port: 443
      sniHosts:
      - apollodata.com
    route:
    - destination:
        host: apollodata.com
  - match:
    - port: 443
      sniHosts:
      - engine-report.apollodata.com
    route:
    - destination:
        host: engine-report.apollodata.com
  - match:
    - port: 443
      sniHosts:
      - apollographql.com
    route:
    - destination:
        host: apollographql.com
</code></pre>
