Dashboard returning forbidden after following tutorial

Hi all,

I’m following the tutorial here: https://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/ (in some Ubuntu 20.04 VM).

I follow all the steps in the tutorial to set up the dashboard, but after setting up the proxy (on the IP address of the machine with sudo k3s kubectl proxy --address 192.168.4.39), I am not able to connect to it.

All I’ve got is ‘forbidden’ as response.

curl http://192.168.4.39:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
-H “Accept: application/json”
-H “Authorization: Bearer ${AUTHENTICATION_TOKEN}”
Forbidden

Am I missing something? Is there any log I can check to see what’s going on?

Many thanks,
Andres

The problem I was having we that i was trying to access the dashboard from a remote IP.

Just changing the type of the kubernetes-dashboard service from clusterIP to NodePort made it available.

Cheers

1 Like