I am able to access my kubernetes dashoard UI by accessing below url and providing the token and hitting sign in button on the login screen
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/workloads?namespace=default
Is there a way I can pass the token via the URL itself so the Dashboard UI opens in logged in state so i don't need to manually past the token and hit sign in?
I am looking for something like this (which was suggested by ChatGPT which unfortunately didn't work, this just opens the login screen again) :
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/?token=<authentication-token>
We can access the kubernetes dashboard UI by two ways
As to answer your question, we can't login by encoding the token in the URL. But we can use
Skipoption to avoid giving the token every time we login.To enable the
Skipbutton to appear in UI we need to add following flags in the dashboard deployment underargssectionAfter adding these flags the deployment looks something like this
Now when you redeploy the dashboard you are able to see the
Skipbutton. By skipping the login will save a lot of time when testing locally deployed clusters.Note: This is not a suggested method in terms of security standpoint. However, if you are deploying in an isolated testing environment you can proceed with the above steps.
For more information refer this link