<p>I have two web application running in same jetty.</p>

<p>If i simply hit the ip:port then it brings the UI application and with context path it brings another REST application.</p>

<p>Below are the configurations: </p>

<pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"  encoding="ISO-8859-1"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" 
      "http://www.eclipse.org/jetty/configure.dtd"&gt;
&lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
    &lt;Set name="contextPath"&gt;/&lt;/Set&gt;
    &lt;Set name="war"&gt;./webapps/my-ui.war&lt;/Set&gt;
&lt;/Configure&gt;
</code></pre>

<pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"  encoding="ISO-8859-1"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" 
      "http://www.eclipse.org/jetty/configure.dtd"&gt;
&lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
    &lt;Set name="contextPath"&gt;/api&lt;/Set&gt;
    &lt;Set name="war"&gt;./webapps/my-rest-api.war&lt;/Set&gt;
&lt;/Configure&gt;
</code></pre>

<p>Is there any option to provide destination path in ingress ?</p>

<p>From the Kubernetes documentation <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">here</a> this is an ingress example:</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        backend:
          serviceName: test
          servicePort: 80
</code></pre>

<p>You can add as many rules as you need to map the path to the right service and port, in your case you can have an ingress like this:</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: app-ingress
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: ui-service
          servicePort: 80
  - http:
      paths:
      - path: /api
        backend:
          serviceName: rest-api-service
          servicePort: 80
</code></pre>
