<p>I have created ingress for some services on minikube (1.8.0):</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: gateway-ingress
  namespace: kube-system
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: api-service
          servicePort: 80
        path: /api
      paths:
      - backend:
          serviceName: kubernetes-dashboard
          servicePort: 80
        path: /ui
</code></pre>

<p>When I access MINIKUBE_IP/ui, the static files of dashboard not work. Below are errors:</p>

<pre><code>192.168.99.100/:1 GET https://192.168.99.100/ui/static/vendor.4f4b705f.css net::ERR_ABORTED
192.168.99.100/:5 GET https://192.168.99.100/ui/static/app.8a6b8127.js net::ERR_ABORTED
VM1524:1 GET https://192.168.99.100/ui/api/v1/thirdpartyresource 404 ()
...
</code></pre>

<p>Please help me to fix this error, thanks.</p>

<p>I had the same issue.
You can solve it by defining new paths in the Ingress resource. </p>

<pre><code> rules:
  - http:
      paths:
      - path: /ui
        backend:
          serviceName: kubernetes-dashboard
          servicePort: 80
      - path: /*
        backend:
          serviceName: kubernetes-dashboard
          servicePort: 80
</code></pre>

<p>The "/*" will allow you to access the static files. </p>

<p>Other resources:</p>

<ul>
<li><a href="https://github.com/kubernetes/ingress-nginx/issues/333" rel="noreferrer">https://github.com/kubernetes/ingress-nginx/issues/333</a></li>
<li><a href="https://github.com/kubernetes/contrib/issues/2238" rel="noreferrer">https://github.com/kubernetes/contrib/issues/2238</a></li>
</ul>
