How to access/expose kubernetes-dashboard service outside of a cluster? : <p>I have got the following services:</p>

<pre><code>ubuntu@master:~$ kubectl get services --all-namespaces
NAMESPACE     NAME                   CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
default       kubernetes             100.64.0.1      &lt;none&gt;        443/TCP         48m
kube-system   kube-dns               100.64.0.10     &lt;none&gt;        53/UDP,53/TCP   47m
kube-system   kubernetes-dashboard   100.70.83.136   &lt;nodes&gt;       80/TCP          47m
</code></pre>

<p>I am attempting to access kubernetes dashboard. The following response seems reasonable, taking into account curl is not a browser.</p>

<pre><code>ubuntu@master:~$ curl 100.70.83.136
 &lt;!doctype html&gt; &lt;html ng-app="kubernetesDashboard"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Kubernetes Dashboard&lt;/title&gt; &lt;link rel="icon" type="image/png" href="assets/images/kubernetes-logo.png"&gt; &lt;meta name="viewport" content="width=device-width"&gt; &lt;link rel="stylesheet" href="static/vendor.36bb79bb.css"&gt; &lt;link rel="stylesheet" href="static/app.d2318302.css"&gt; &lt;/head&gt; &lt;body&gt; &lt;!--[if lt IE 10]&gt;
      &lt;p class="browsehappy"&gt;You are using an &lt;strong&gt;outdated&lt;/strong&gt; browser.
      Please &lt;a href="http://browsehappy.com/"&gt;upgrade your browser&lt;/a&gt; to improve your
      experience.&lt;/p&gt;
    &lt;![endif]--&gt; &lt;kd-chrome layout="column" layout-fill&gt; &lt;/kd-chrome&gt; &lt;script src="static/vendor.633c6c7a.js"&gt;&lt;/script&gt; &lt;script src="api/appConfig.json"&gt;&lt;/script&gt; &lt;script src="static/app.9ed974b1.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; 
</code></pre>

<p>According to the documentation the right access point is <a href="https://localhost/ui" rel="noreferrer">https://localhost/ui</a>. So, I am trying it and receive a bit worrying result. <strong>Is it expected response?</strong></p>

<pre><code>ubuntu@master:~$ curl https://localhost/ui
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
</code></pre>

<p>Trying the same without certificate validation. For curl it might be OK. but I have got the same in a browser, which is connecting though port forwarding via vagrant forwarded_port option.</p>

<pre><code>ubuntu@master:~$ curl -k https://localhost/ui
Unauthorized
</code></pre>

<p><strong>What I am doing wrong? and how to make sure I can access the UI?</strong> Currently it responds with Unauthorized.</p>

<p>The docs for the dashboard tell the password is in the configuration:</p>

<pre><code>ubuntu@master:~$ kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []
</code></pre>

<p>but it seems I have got nothing... <strong>Is it expected behavior? How can I authorize with the UI?</strong></p>
