Unable to log in to Kubernetes dashboard via browser

Bug #1904022 reported by Kenneth Koski
6
This bug affects 1 person
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]/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=kubeflow

See here for how I previously printed out the login information:

https://github.com/juju-solutions/bundle-kubeflow/blob/fix-ck-info/scripts/cli.py#L151-L156

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.

Revision history for this message
George Kraft (cynerva) wrote :

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.