<p>I am trying to access kubernetes dashboard on my local PC through Ingress. The steps I've done so far are:</p>
<ol>
<li>Install Nginx Ingress by:</li>
</ol>
<pre><code>    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/cloud/deploy.yaml

PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl get all -n ingress-nginx
NAME                                            READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create-7rzdl        0/1     Completed   0          148m
pod/ingress-nginx-admission-patch-295pf         0/1     Completed   0          148m
pod/ingress-nginx-controller-7fc74cf778-jz6ts   1/1     Running     0          148m

NAME                                         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/ingress-nginx-controller             LoadBalancer   10.106.183.115   localhost     80:30673/TCP,443:32591/TCP   148m
service/ingress-nginx-controller-admission   ClusterIP      10.103.188.122   &lt;none&gt;        443/TCP                      148m

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-controller   1/1     1            1           148m

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-controller-7fc74cf778   1         1         1       148m

NAME                                       COMPLETIONS   DURATION   AGE
job.batch/ingress-nginx-admission-create   1/1           16s        148m
job.batch/ingress-nginx-admission-patch    1/1           16s        148m
</code></pre>
<ol start="2">
<li>Install kubernetes dashboard:</li>
</ol>
<pre><code>   kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
</code></pre>
<p>When I inspect kubernetes dashboard namespace, I notice that the service is running on port 443:</p>
<pre><code>PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl  get service -n kubernetes-dashboard -o wide
NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE    SELECTOR
dashboard-metrics-scraper   ClusterIP   10.110.109.6     &lt;none&gt;        8000/TCP   135m   k8s-app=dashboard-metrics-scraper
kubernetes-dashboard        ClusterIP   10.110.230.166   &lt;none&gt;        443/TCP    135m   k8s-app=kubernetes-dashboard
</code></pre>
<p>So I created Ingress rule:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard-ingress
  namespace: kubernetes-dashboard
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;
    nginx.ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
spec:
  rules:
  - host: &quot;my-dashboard.com&quot;
    http:
      paths:
      - pathType: Prefix
        path: &quot;/&quot;
        backend:
          service:
            name: kubernetes-dashboard
            port: 
              number: 443
</code></pre>
<p>and after applying this rule:</p>
<pre><code>PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl  get ingress -n kubernetes-dashboard -o wide
Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
NAME                CLASS    HOSTS                ADDRESS     PORTS   AGE
dashboard-ingress   &lt;none&gt;   my-dashboard.com   localhost   80      121m
</code></pre>
<p>I just add the following entry in my windows host file:</p>
<pre><code>127.0.0.1 my-dashboard.com
</code></pre>
<p>However, I am getting nothing when I tried to access the dashboard through my browser (<a href="http://my-dashboard.com" rel="nofollow noreferrer">http://my-dashboard.com</a>). Have I missed anything?</p>
<p>I was following the tutorial here: <a href="https://www.youtube.com/watch?v=X48VuDVv0do" rel="nofollow noreferrer">https://www.youtube.com/watch?v=X48VuDVv0do</a>. The tutorial was done using minikube - so the dashboard there was available on port 80. Whereas the one i installed directly from github above was available on port 443.  Do I need to configure some certificate / secret? I noticed that a few stuffs were created in the Secret by kubernetes-dashboard:</p>
<pre><code>PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl  get secret -n kubernetes-dashboard -o wide
NAME                               TYPE                                  DATA   AGE
default-token-97skl                kubernetes.io/service-account-token   3      140m
kubernetes-dashboard-certs         Opaque                                0      140m
kubernetes-dashboard-csrf          Opaque                                1      140m
kubernetes-dashboard-key-holder    Opaque                                2      140m
kubernetes-dashboard-token-rwgs4   kubernetes.io/service-account-token   3      140m
</code></pre>
<p>and if i tried to describe Ingress:</p>
<pre><code>PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl describe ingress  dashboard-ingress -n kubernetes-dashboard
Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
Name:             dashboard-ingress
Namespace:        kubernetes-dashboard
Address:          localhost
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host                Path  Backends
  ----                ----  --------
  my-dashboard.com
                      /   kubernetes-dashboard:443 (10.1.0.106:8443)
Annotations:          kubernetes.io/ingress.class: nginx
                      nginx.ingress.kubernetes.io/backend-protocol: HTTPS
                      nginx.ingress.kubernetes.io/ssl-passthrough: true
Events:
  Type    Reason  Age                   From                      Message
  ----    ------  ----                  ----                      -------
  Normal  Sync    7m4s (x10 over 144m)  nginx-ingress-controller  Scheduled for sync
</code></pre>
<p>I know I can access the dashboard using kubectl proxy - but I would like to test out Ingress (learning it).  Thank you in advance!</p>
<p>I'm running the following:</p>
<ul>
<li>Docker Desktop 3.2.2 (61853)</li>
<li>Engine: 20.10.5</li>
<li>Compose: 1.28.5</li>
<li>Kubernetes: v1.19.7</li>
</ul>

caffeine_inquisitor
<p>Your service name seems to be wrong:</p>
<p>You listed your services:</p>
<pre><code>PS D:\dev\kubernetes-dashboard-ingress&gt; kubectl  get service -n kubernetes-dashboard -o wide
NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE    SELECTOR
dashboard-metrics-scraper   ClusterIP   10.110.109.6     &lt;none&gt;        8000/TCP   135m   k8s-app=dashboard-metrics-scraper
kubernetes-dashboard        ClusterIP   10.110.230.166   &lt;none&gt;        443/TCP    135m   k8s-app=kubernetes-dashboard
</code></pre>
<p>In your ingress:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dashboard-ingress
  namespace: kubernetes-dashboard
  annotations:
    nginx.ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
spec:
  rules:
  - host: &quot;my-dashboard.com&quot;
    http:
      paths:
      - pathType: Prefix
        path: &quot;/&quot;
        backend:
          service:
            name: my-dashboard  # &lt;&lt;&lt; This line should be kubernetes-dashboard
            port: 
              number: 443
</code></pre>
