Unable to log in to Kubernetes dashboard via browser
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charmed Kubernetes Bundles |
New
|
Undecided
|
Unassigned |
Bug Description
On previous version of Charmed Kubernetes, I was able to log into the dashboard by printing out information from `kubectl config view, and then going to a URL like this:
https://[LOAD-BALANCER]
See here for how I previously printed out the login information:
https:/
I don't know exactly when things changed, but I assume in 1.19. Now, I get a token instead of a username/password. This might work for login, but when I go to attempt to log in at the above URL, I get a 401 API error, and not the dashboard login page. I'm unable to use the browser to log into the dashboard to become authorized.
Yep, that URL will no longer work. It was taking advantage of the Kubernetes API using basic auth, which is something that web browsers understand.
Kubernetes no longer support basic auth. We have to use token auth instead, and unfortunately, it's not so easy to access the Kubernetes API with a browser now. For now, you will have to use the documented approach with `kubectl proxy`, which handles the auth for you.
What's needed is a proper way to expose the dashboard that does *not* go through the Kubernetes API. There is an existing issue about it here: https:/ /bugs.launchpad .net/charm- kubernetes- master/ +bug/1835396
I'm going to mark this one as a duplicate.