Ssh – Error 404 when trying to access Kubernetes dashboard from remote laptop using SSH proxy

authorizationkubernetesmonitoringremote-accessssh

I have a remote cluster on a remote private Cloud to which I have only SSH access (no GUI). I started the proxy server with:

kubectl proxy --address=0.0.0.0 --accept-hosts=.*

And started a local SSH proxy to the remote K8s master with:

ssh -L 8001:127.0.0.1:8001 -N -f $MASTER_IP

The dashboard is accessible from the following address on my local laptop:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login

For the token I created a CluserRoleBinding and retrieved the token using (You can find detailed instructions in a reply on this link) :

kubectl describe secret $ROLE-TOKEN

But once I click sign in, I get:

404 Not found. The server could not find the requested resource.

What is the reason for this and how to get around it ?

Technical details:

OS: Debian 10
Kubernetes installed with Kubespray
Kubespray version: 2.12.0
Kubernetes version: 1.16.3
Dashboard version: 1.10.1

Best Answer

There is a conflict between Dashboard version: 1.10.1 and Kubernetes version: 1.16 (source) where dashboard token auth does not work.

In order to fix it you should use dashboard version 2.0.0-x that works with Kubernetes 1.16. Here you can chose a 1.16 compatible version to install.

Please let me know if that helped.

Related Topic