<h1>Question</h1>

<p>It is not clear how to access the dashboard with HTTPS and cannot find a clear documentation (it just tells to use kubectl proxy). So what is the way to access the dashboard with HTTPS?</p>

<p><a href="https://github.com/kubernetes/dashboard" rel="noreferrer">Kubernetes Dashboard GitHub</a> tells:</p>

<blockquote>
  <p>The shortcut <a href="http://localhost:8001/ui" rel="noreferrer">http://localhost:8001/ui</a> is deprecated. Use the full proxy URL shown above.</p>
</blockquote>

<p><a href="https://github.com/kubernetes/dashboard/wiki/Installation#recommended-setup" rel="noreferrer">K8S Dashboard Recommended Setup</a> or 
<a href="https://github.com/kubernetes/dashboard/wiki/FAQ" rel="noreferrer">K8S Dashboard FAQ</a> do not tell how to access the dashboard without proxy.</p>

<blockquote>
  <p><strong>I'm accessing Dashboard over HTTPS</strong><BR><BR>
  The reason why /ui redirect does not work for HTTPS is that it hasn't yet been updated in the core repository. You can track <a href="https://github.com/kubernetes/kubernetes/pull/53046#discussion_r145338754" rel="noreferrer">https://github.com/kubernetes/kubernetes/pull/53046#discussion_r145338754</a> to find out when it will be merged. Probably it won't be available until K8S 1.8.3+.
  <br><br>
  Correct links that can be used to access Dashboard are in our documentation. Check Accessing Dashboard to find out more.</p>
</blockquote>

<hr>

<p>However, the <a href="https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml" rel="noreferrer">kubernetes-dashboard.yaml</a> manifest defines the service endpoint to the dashboard as below:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system
spec:
  ports:
    - port: 443
      targetPort: 8443
  selector:
    k8s-app: kubernetes-dashboard
</code></pre>

<p>And the cluster IP (in my environment) assigned is below.</p>

<pre><code># kubectl get svc -n kube-system
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
kubernetes-dashboard   ClusterIP   10.101.199.14   &lt;none&gt;        443/TCP         4h
</code></pre>

<p>Simply create a SSH tunnel to the 10.101.199.14:443 and access to it (<a href="https://localhost:8001" rel="noreferrer">https://localhost:8001</a>) shows the dashboard.</p>

<p><a href="https://i.stack.imgur.com/NSuIa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NSuIa.png" alt="enter image description here"></a></p>

<p>So, basically, there is no need to use kubectl proxy and directly access the clusterIP:443 is the way to access the dashboard with HTTPS? </p>

<p>Kindly suggest where is the up-to-date and accurate documentation on how to use the K8S dashboard.</p>

<h2>Environment</h2>

<pre><code># kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T20:55:30Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>As no time to test the suggestion by Suresh, used below for now.</p>

<p>Get the kubernetes-dashboard service account token (given cluster-admin role).</p>

<pre><code>$ kubectl get secret -n kube-system | grep kubernetes-dashboard
kubernetes-dashboard-token-42b78                 kubernetes.io/service-account-token   3         1h

$ kubectl describe secret kubernetes-dashboard-token-42b78 -n kube-system
Name:         kubernetes-dashboard-token-42b78
Namespace:    kube-system
Labels:       &lt;none&gt;
Annotations:  kubernetes.io/service-account.name=kubernetes-dashboard
              kubernetes.io/service-account.uid=36347792-ecdf-11e7-9ca8-06bb783bb15c

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1025 bytes
namespace:  11 bytes
token:    &lt;TOKEN&gt;
</code></pre>

<p>Start SSH tunnel.</p>

<pre><code>ssh -L localhost:8001:172.31.4.117:6443 centos@&lt;K8SServer&gt;
</code></pre>

<p>Use Chrome <a href="https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en" rel="nofollow noreferrer">ModHeader</a> extension to send the Bearer token.</p>

<p><a href="https://i.stack.imgur.com/ThIln.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ThIln.png" alt="enter image description here"></a></p>

<p>Access the API server endpoint via SSH tunnel (local port 8001).</p>

<pre><code>https://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
</code></pre>

<p><a href="https://i.stack.imgur.com/4oAeS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4oAeS.png" alt="enter image description here"></a></p>
