<p>I use this command to install and enable Kubernetes dashboard on a remote host:</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml


kubectl proxy --address='192.168.1.132' --port=8001 --accept-hosts='^*$'

http://192.168.1.132:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
</code></pre>
<p>But I get:</p>
<pre><code>Insecure access detected. Sign in will not be available. Access Dashboard securely over HTTPS or using localhost. Read more here .
</code></pre>
<p>Is it possible to enable SSL connection on the Kubernetes host so that I can access it without this warning message and enable login?</p>

<p>From the service definition</p>
<pre class="lang-yaml prettyprint-override"><code>kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
spec:
  ports:
    - port: 443
      targetPort: 8443
  selector:
    k8s-app: kubernetes-dashboard
</code></pre>
<p>Which exposes port 443 (aka https). So it's already preconfigured. First, use https instead of http in your URL.</p>
<p>Then, instead of doing a <code>kubectl proxy</code>, why not simply</p>
<pre><code>kubectl port-forward -n kubernetes-dashboard services/kubernetes-dashboard 8001:443
</code></pre>
<p>Access endpoint via <a href="https://127.0.0.1:8001/#/login" rel="noreferrer">https://127.0.0.1:8001/#/login</a></p>
<p>Now it's going to give the typical &quot;certificate not signed&quot; since the certificate are self signed (arg <code>--auto-generate-certificates</code> in deployment definition). Just skip it with your browser. See an article like <a href="https://vmwire.com/2022/02/07/running-kubernetes-dashboard-with-signed-certificates/" rel="noreferrer">https://vmwire.com/2022/02/07/running-kubernetes-dashboard-with-signed-certificates/</a> if you need to configure a signed certificate.</p>
