<p>I try to configure istio ingress using openshift route. As I understand the request path is as follows:</p>
<pre><code>request -&gt; route -&gt; ingress service -&gt; gateway -&gt; virtual service -&gt; app service -&gt; app
</code></pre>
<p>So, I apply follow config:</p>
<p>Route.yml:</p>
<pre><code>kind: Route
  ...
spec:
  host: my-app.com
    to:
      kind: Service
      name: ingress-service
      weight: 100
    port:
      targetPort: http
  ...
</code></pre>
<p>ingress-service.yml:</p>
<pre><code>kind: Service
metadata:
  name: ingress-service
...
spec:
  ports:
    - name: status-port
      protocol: TCP
      port: 15020
      targetPort: 15020
    - name: http
      protocol: TCP
      port: 9080
      targetPort: 9080
  selector:
    app: ingressgateway
    istio: ingressgateway
  type: ClusterIP 
</code></pre>
<p>ingress-gateway.yml:</p>
<pre><code>kind: Gateway
metadata:
  name: ingress-gw
...
spec:
  servers:
    - hosts:
        - my-app.com
      port:
        name: http
        number: 9080
        protocol: HTTP
  selector:
    istio: ingressgateway
</code></pre>
<p>ingress-virtual-service.yml</p>
<pre><code>kind: VirtualService
...
spec:
  hosts:
    - my-app.com
  gateways:
    - ingress-gw
  http:
    - route:
      - destination:
          host: my-app
          port: 9080
  exportTo:
    - .
</code></pre>
<p>I dont set up port 9080 in deployment for ingressgateway pod. And it works. But only if I send request to <a href="http://my-app.com:80" rel="nofollow noreferrer">http://my-app.com:80</a></p>
<p>Where did I go wrong and how to make only path accessible <a href="http://my-app.com:9080" rel="nofollow noreferrer">http://my-app.com:9080</a> ?</p>

pwflamy
<p>The exposed port numbers for external depend on Router(HAProxy) pod listening ports on OpenShift. If you want to 9080 port instead of 80, you should change the port on Router(HAProxy) pod. Or you can handle the port number on LB to use other port numbers.</p>
<p>The access flow is as follows.</p>
<pre><code>LB(80, 443) 
   -&gt; Router pod(80, 443) 
      -&gt; Ingress-Gateway pod
         -Through Gateway and VirtualService -&gt; Backend pod
</code></pre>
