<p>The k8s cluster is installed on a host which is only allowed requests through    port 443 from external network. That means all the pods managed by k8s only can be reached through port 443. I installed a Nginx on the host to server reverse proxy to k8s cluster. I installed dashboard and other apps in k8s. The k8s dashboard is exposed with a nodePort 31117. How to config a basehref in k8s dashboard? For example <a href="https://ip/dashboard" rel="nofollow noreferrer">https://ip/dashboard</a> to open the k8s dashboard.</p>

Ethan Hu
<p>You need to set up an upstream in nginx. Since you have exposed it as NodePort - </p>

<pre><code>location /dashboard/ {
proxy_pass https://&lt;any-node-ip&gt;:&lt;dashboard-node-port&gt;/;
}
</code></pre>

<p>You can also look at <code>Ingress</code> resource using which you can do the same without hosting your own nginx server. </p>
