Dashboard: Dashboards works perfectly on Windows 10 but gives 403 Forbidden on Manjaro

Created on 26 Oct 2019  路  6Comments  路  Source: kubernetes/dashboard

Environment
Installation method:
Kubernetes version: 1.16
Dashboard version: v2.0.0-beta5
Operating system: Manjaro 18
Node.js version ('node --version' output): 12.9
Go version ('go version' output): Not installed
Steps to reproduce

while on windows, proxy dashboard with

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

and access to it by navigating to

http://127.0.0.1:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Everything works perfectly.

Do the same on manjaro, everything (even the favicon) gives 403 Forbidden.

Observed result

Cannot run the dashboard on Manjaro

Expected result

Access on dashboard on Windows and Manjaro.

Comments

I am using the same kubeconfig on both OS.

kinbug

All 6 comments

I think this has nothing to do with Dashboard as it does not depend on the system you are running kubectl on. It lives inside the cluster and it is simply a web app. If there are some issues then it would be either with kubectl or your browser.

Also, something makes me think that you are trying to access Dashboard using external IP (kubectl proxy --address 0.0.0.0 --accept-hosts .*). This will not work.

I think this has nothing to do with Dashboard as it does not depend on the system you are running kubectl on. It lives inside the cluster and it is simply a web app. If there are some issues then it would be either with kubectl or your browser.

Also, something makes me think that you are trying to access Dashboard using external IP (kubectl proxy --address 0.0.0.0 --accept-hosts .*). This will not work.

Agree, can you give me some hints on where the problem could be? Consider that normal commands of kubectl are working fine.

Why the command shouldn't? I'm proxying from a linux server, how I should do it?

https://github.com/kubernetes/dashboard/blob/master/docs/user/accessing-dashboard/1.7.x-and-above.md#kubectl-proxy

NOTE: Dashboard should not be exposed publicly using kubectl proxy command as it only allows HTTP connection. For domains other than localhost and 127.0.0.1 it will not be possible to sign in. Nothing will happen after clicking Sign in button on login page.

There are some steps missing on your side, but I think this security measure is still applied. localhost domain should work normally.

It is not exposed publicly, it's proxied to my localhost by using kubectl, so it should be secure enough.... no?

Then can you simply use kubectl proxy without any arguments?

Guess what, now it works also on manjaro....... That command was a refuse when I was setupping bare-metal k8s. Thanks @floreks.

Was this page helpful?
0 / 5 - 0 ratings