<p>We have installed Istio on my Kubernetes cluster on AWS (we are using EKS). We have deployed several applications such as: Airflow, Jenkins, Grafana, etc. and we are able to reach them with <code>port-forward</code>. So, they are working as expected.</p>

<p>Now, what we would like to achieve is the possibility of mounting the applications on specific paths so that we can access them via an unique entrypoint.</p>

<p>Here an example to explain what I mean with "unique entrypoint":</p>

<ul>
<li><a href="http://a517f7.eu-west-1.elb.amazonaws.com/aiflow/" rel="nofollow noreferrer">http://a517f7.eu-west-1.elb.amazonaws.com/aiflow/</a> and you can see Airflow dahsboard</li>
<li><a href="http://a517f7.eu-west-1.elb.amazonaws.com/jenkins/" rel="nofollow noreferrer">http://a517f7.eu-west-1.elb.amazonaws.com/jenkins/</a> and you can see Jenkins dahsboard</li>
<li><a href="http://a517f7.eu-west-1.elb.amazonaws.com/grafana/" rel="nofollow noreferrer">http://a517f7.eu-west-1.elb.amazonaws.com/grafana/</a> and you can see Grafana dahsboard</li>
</ul>

<p>What we tried is the following</p>

<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: apps-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: airflow-virtual-service  
spec:
  hosts:
  - "*"
  gateways:
  - apps-gateway
  http:
  - match:
    - uri:
        prefix: /airflow
    route:
    - destination:
        host: webserver.airflow.svc.cluster.local
        port:
          number: 8080
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: grafana-virtual-service  
spec:
  hosts:
  - "*"
  gateways:
  - apps-gateway
  http:
  - match:
    - uri:
        prefix: /grafana
    route:
    - destination:
        host: grafana.grafana.svc.cluster.local
        port:
          number: 3306
---
and so on
</code></pre>

<p>In this way but I keep having <code>Aiflow 404 = lots of circles</code> or similar depending on the service.</p>

<p>Do you know how to achieve such a result with Istio? We are also open to also use Nginx or Traefik.</p>

spaghettifunk
<p>So based on the comments:</p>

<p>The best way to expose a frontend &amp; backend it's to separate both with a wildcard domain like <code>*.domain.com</code>. </p>

<p>For the frontend:</p>

<p><code>my-app.domain.com/</code></p>

<p>For the backend services it will always start with a subdomain like <code>api</code>:</p>

<p><code>api.domain.com/foo</code></p>

<p>For backend service you will need to use <code>rewrite</code> if your backend service it's no serving the path.</p>

<pre><code>rewrite:
  uri: "/"
</code></pre>

<p>Check Istio docs for more info about rewrite <a href="https://istio.io/docs/reference/config/istio.networking.v1alpha3/#Destination" rel="nofollow noreferrer">https://istio.io/docs/reference/config/istio.networking.v1alpha3/#Destination</a></p>
