<p>I want to create my own ingress gateway with Istio. Here's my intention:</p>

<pre><code>traffic on 4000 &gt; my-gateway &gt; my-virtualservice &gt;  web service (listening on 4000)
</code></pre>

<p>I've deployed the following YAML:</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 4000
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: my-virtualservice
spec:
  hosts:
  - "*"
  gateways:
  - my-gateway
  http:
  - route:
    - destination:
        host: web
        port:
          number: 4000
</code></pre>

<p>This <strong>doesn't</strong> work, but changing the gateway port <code>number: 4000</code> to <code>number: 80</code> <strong>does</strong> work.
Presumably because the <code>istio-ingressgateway</code> is open on 80.</p>

<p>Which leads me to believe that this chain is actually:</p>

<p><code>traffic on 4000 &gt; my-gateway &gt; my-virtualservice &gt; istio-ingressgateway &gt; web service</code></p>

<p>I assume I can fix this by opening 4000 on the <code>istio-ingressgateway</code> but doesn't that defeat the point of creating a custom gateway?</p>

<p>I thought the whole point of creating <code>my-gateway</code> was to avoid using the <code>istio-ingressgateway</code>?</p>

<p>Help me understand! :D</p>

A. Gardner
<p>Traffic Flow: Clent -> LoadBalancer(Ingress Gateway Service) -> Ingress Gateway Envoy -> Sidecar Envoy for your application -> Your application.</p>

<p>The ingress gateway is an envoy deployed at the edge of a Kubernetes cluster. All incoming request(HTTP, TCP) to the services inside the cluster arrives at the ingress gateway.The Gateway and Virtual Service kind is what lets you configure Envoy proxy of the ingress gateway.</p>

<p>Creating a gateway object does not really deploy a new gateway,it just configures the same envoy proxy running as the ingress gateway.</p>

<p>Here is a good <a href="https://livebook.manning.com/book/istio-in-action/chapter-4/v-5/" rel="nofollow noreferrer">reference</a></p>
