<p>I have deployed minikube on Windows VM and the minikube VM is created on Virtualbox with the host-only IP.</p>
<p>I have deployed the Kubernetes dashboard with NodePort IP so I can access it from outside the cluster. The svc is as follows:</p>
<pre><code>PS C:\Users\XXX\Desktop\ingress&gt; kubectl get svc -n kubernetes-dashboard
NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
dashboard-metrics-scraper   ClusterIP   10.111.167.61   &lt;none&gt;        8000/TCP        5d20h
kubernetes-dashboard        NodePort    10.111.220.57   &lt;none&gt;        443:30613/TCP   5d20h
</code></pre>
<p>With the help of the minikube ingress addon, I installed the Ingress controller which is of Nginx. Its svc details are as follows:</p>
<pre><code>PS C:\Users\XXX\Desktop\ingress&gt; kubectl get svc -n ingress-nginx
NAME                                 TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx-controller             NodePort    10.98.29.41   &lt;none&gt;        80:32628/TCP,443:31194/TCP   5d20h
ingress-nginx-controller-admission   ClusterIP   10.96.35.36   &lt;none&gt;        443/TCP                      5d20h
</code></pre>
<p>Then I have created an Ingress Rule for my dashboard application as follows:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard-ingress
  namespace: kubernetes-dashboard
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/ingress.class: &quot;nginx&quot;
    nginx.ingress.kubernetes.io/add-base-url: &quot;true&quot;
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
    nginx.ingress.kubernetes.io/secure-backends: &quot;true&quot;
    nginx.ingress.kubernetes.io/force-ssl-redirect: &quot;true&quot;
    ingress.kubernetes.io/configuration-snippet: |
      rewrite ^(/dashboard)$ $1/ permanent;
spec:
  rules:
  - host: k8s.dashboard.com
    http:
      paths:
      - path: /dashboard
        pathType: Prefix
        backend:
          service:
            name: kubernetes-dashboard
            port:
              number: 443
</code></pre>
<p>But now when I am trying to access the dashboard with the following URL <code>https://k8s.dashboard.com/dashboard</code> then I am facing the error of 404 Not Found. I also tried multiple URL to access the dashboard such as :</p>
<pre><code>https://k8s.dashboard.com:30613/dashboard
http://k8s.dashboard.com:30613/dashboard
https://k8s.dashboard.com/dashboard
</code></pre>
<p>But this URL is working for me: <code>https://k8s.dashboard.com:30613</code>
I have added the minikube IP to hosts files in the Windows machine.
Ingress rule describe the output is as follows:</p>
<pre><code>PS C:\Users\XXX\Desktop\ingress&gt; kubectl describe ingress -n kubernetes-dashboard
Name:             dashboard-ingress
Namespace:        kubernetes-dashboard
Address:          192.168.56.100
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host               Path  Backends
  ----               ----  --------
  k8s.dashboard.com
                     /dashboard   kubernetes-dashboard:443 (172.17.0.4:8443)
Annotations:         ingress.kubernetes.io/configuration-snippet: rewrite ^(/dashboard)$ $1/ permanent;
                     kubernetes.io/ingress.class: nginx
                     nginx.ingress.kubernetes.io/add-base-url: true
                     nginx.ingress.kubernetes.io/backend-protocol: HTTPS
                     nginx.ingress.kubernetes.io/force-ssl-redirect: false
                     nginx.ingress.kubernetes.io/rewrite-target: /
                     nginx.ingress.kubernetes.io/secure-backends: true
Events:
  Type    Reason  Age                   From                      Message
  ----    ------  ----                  ----                      -------
  Normal  Sync    26m (x16 over 5d20h)  nginx-ingress-controller  Scheduled for sync
</code></pre>
<p>Any help regarding this really helps. Thanks</p>
<p><code>EDITED</code>
My ingress controller logs are as follows:</p>
<pre><code>192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /dashboard HTTP/2.0&quot; 200 746 &quot;-&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 418 0.019 [kubernetes-dashboard-kubernetes-dashboard-443] [] 172.17.0.4:8443 746 0.018 200 1a2793052f70031c6c9fa59b0d4374d1
192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /styles.aa1f928b22a88c391404.css HTTP/2.0&quot; 404 548 &quot;https://k8s.dashboard.com/dashboard&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 101 0.002 [upstream-default-backend] [] 127.0.0.1:8181 548 0.002 404 1974258442f8b4c46d8badd1dda3e3f5
192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /runtime.2a456dd93bf6c4890676.js HTTP/2.0&quot; 404 548 &quot;https://k8s.dashboard.com/dashboard&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 49 0.008 [upstream-default-backend] [] 127.0.0.1:8181 548 0.007 404 96c17c52e6337f29dd8b2b2b68b088ac
192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /polyfills.f4f05ad675be9638106e.js HTTP/2.0&quot; 404 548 &quot;https://k8s.dashboard.com/dashboard&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 40 0.008 [upstream-default-backend] [] 127.0.0.1:8181 548 0.007 404 096ae29cb168523aa9191f27a967e47a
192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /scripts.128068f897fc721c4673.js HTTP/2.0&quot; 404 548 &quot;https://k8s.dashboard.com/dashboard&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 38 0.008 [upstream-default-backend] [] 127.0.0.1:8181 548 0.007 404 728f73f75276167b387dc87a69b65a72
192.168.56.1 - - [16/Jun/2021:06:57:00 +0000] &quot;GET /en.main.09bf52db2dbc808e7279.js HTTP/2.0&quot; 404 548 &quot;https://k8s.dashboard.com/dashboard&quot; &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36&quot; 38 0.014 [upstream-default-backend] [] 127.0.0.1:8181 548 0.014 404 b11e5ae324a828508d488816306399c2
</code></pre>
<p>and this is dashboard logs</p>
<pre><code>172.17.0.1 - - [16/Jun/2021:06:59:46 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
172.17.0.1 - - [16/Jun/2021:06:59:56 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
172.17.0.1 - - [16/Jun/2021:07:00:00 +0000] &quot;GET /healthz HTTP/1.1&quot; 200 13 &quot;&quot; &quot;dashboard/v2.2.0&quot;
172.17.0.1 - - [16/Jun/2021:07:00:06 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
172.17.0.1 - - [16/Jun/2021:07:00:16 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
172.17.0.1 - - [16/Jun/2021:07:00:26 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
172.17.0.1 - - [16/Jun/2021:07:00:30 +0000] &quot;GET /healthz HTTP/1.1&quot; 200 13 &quot;&quot; &quot;dashboard/v2.2.0&quot;
172.17.0.1 - - [16/Jun/2021:07:00:36 +0000] &quot;GET / HTTP/1.1&quot; 200 6 &quot;&quot; &quot;kube-probe/1.20&quot;
{&quot;level&quot;:&quot;error&quot;,&quot;msg&quot;:&quot;Error scraping node metrics: the server could not find the requested resource (get nodes.metrics.k8s.io)&quot;,&quot;time&quot;:&quot;2021-06-16T07:00:41Z&quot;}
</code></pre>

<p>According to <a href="https://github.com/kubernetes/dashboard/issues/5017" rel="nofollow noreferrer">this issue</a> this is a limitation/bug of the kubernetes dashboard.</p>
<p>They suggest using this config as a workaround:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kubernetes-dashboard
  labels:
    app.kubernetes.io/name: kubernetes-dashboard  
  annotations:
    kubernetes.io/ingress.class: nginx
    # Add https backend protocol support for ingress-nginx
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header Accept-Encoding &quot;&quot;;
      sub_filter '&lt;base href=&quot;/&quot;&gt;' '&lt;base href=&quot;/dashboard/&quot;&gt;';
      sub_filter_once on;
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
    - host: my.example.com
      http:
        paths:
          - path: /dashboard(/|$)(.*)
            backend:
              serviceName: kubernetes-dashboard
              servicePort: 443
</code></pre>
