<p>I have used the following configuration to setup the Istio</p>
<pre><code>cat &lt;&lt; EOF | kubectl apply -f -
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: istio-control-plane
spec:
  # Use the default profile as the base
  # More details at: https://istio.io/docs/setup/additional-setup/config-profiles/
  profile: default
  # Enable the addons that we will want to use
  addonComponents:
    grafana:
      enabled: true
    prometheus:
      enabled: true
    tracing:
      enabled: true
    kiali:
      enabled: true
  values:
    global:
      # Ensure that the Istio pods are only scheduled to run on Linux nodes
      defaultNodeSelector:
        beta.kubernetes.io/os: linux
    kiali:
      dashboard:
        auth:
          strategy: anonymous
  components:
    egressGateways:
    - name: istio-egressgateway
      enabled: true
EOF
</code></pre>
<p>I could see that the istio services</p>
<p><a href="https://i.stack.imgur.com/2WTvd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2WTvd.png" alt="enter image description here" /></a></p>
<blockquote>
<p>kubectl get svc -n istio-system</p>
</blockquote>
<p>I have deployed the sleep app</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.7/samples/sleep/sleep.yaml
-n akv2k8s-test
</code></pre>
<p>and have deployed the ServiceEntry</p>
<pre><code>kubectl apply -f - &lt;&lt;EOF
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: httpbin-ext
  namespace: akv2k8s-test
spec:
  hosts:
  - httpbin.org
  ports:
  - number: 80
    name: http
    protocol: HTTP
  resolution: DNS
  location: MESH_EXTERNAL
EOF
</code></pre>
<p>and tried accessing the external URL</p>
<pre><code>export SOURCE_POD=$(kubectl get -n  akv2k8s-test  pod -l app=sleep -o jsonpath='{.items..metadata.name}')
kubectl exec &quot;$SOURCE_POD&quot;  -n  akv2k8s-test  -c sleep -- curl -sI http://httpbin.org/headers | grep  &quot;HTTP/&quot;; 
</code></pre>
<p>however I could not see any logs reported on the proxy</p>
<pre><code>kubectl logs &quot;$SOURCE_POD&quot; -n  akv2k8s-test -c istio-proxy | tail
</code></pre>
<p><a href="https://i.stack.imgur.com/PPxV3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PPxV3.png" alt="enter image description here" /></a></p>
<p>as per the documentation I should see this</p>
<p><a href="https://i.stack.imgur.com/JBPbY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JBPbY.png" alt="enter image description here" /></a></p>
<p>however I don't see the header</p>
<p><a href="https://i.stack.imgur.com/x1MfC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x1MfC.png" alt="enter image description here" /></a></p>
<p>am I missing something here?</p>

One Developer
<p>Just to clarify what Karthikeyan Vijayakumar did to make this work.</p>
<p>In theory istio Egress Gateway won't work here because you haven't used it, you just used istio Service Entry to access publicly accessible service edition.cnn.com from within your Istio cluster.</p>
<p>Take a look at documentation <a href="https://istio.io/latest/docs/tasks/traffic-management/egress/egress-gateway/#egress-gateway-for-http-traffic" rel="nofollow noreferrer">here</a>, you need few more components to actually use it.</p>
<p>You're missing Egress Gateway, Destination Rule and Virtual Service as per above documentation point 3 and 4.</p>
<p>Service entry enables adding additional entries into Istio’s internal service registry, so that auto-discovered services in the mesh can access/route to these manually specified services. It's not like you enable egress gateway and just with that every traffic goes through Egress Gateway.</p>
<p>When you add below dependencies the traffic goes as follow, I assume you are using the pod inside the cluster to communicate with external service.</p>
<p>[sleep pod - envoy sidecar] -&gt; mesh gateway -&gt; egress gateway -&gt; external service</p>
