<p>In my minikube k8s cluster, I have 2 applications/services. </p>

<p>This is my ingress controller for the services I have. </p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-tutorial
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  backend:
    serviceName: default-http-backend
    servicePort: 80
  rules:
  - host: mysite.com
    http:
      paths:
      - path: /sva
        backend:
          serviceName: app-a
          servicePort: 8080
      - path: /svb
        backend:
          serviceName: app-b
          servicePort: 8150
</code></pre>

<p>When i type <code>mysite.com/sva</code> or <code>mysite.com/svb</code> it routes to appropriate services. However, none of the static files <code>(js, css, images etc)</code> is loaded as they seem to request for the resources from <code>mysite.com</code> instead of <code>mysite.com/sva/</code></p>

<p>How can I make it look for the resources under specific service?</p>

KitKarson
<p>Try to Add the following annotation in ingress </p>

<blockquote>
  <p>ingress.kubernetes.io/add-base-url: "true"</p>
</blockquote>

<p>will solves this problem.</p>

<p>You can also review : <a href="https://github.com/kubernetes/ingress-nginx/issues/333" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/issues/333</a></p>
