Yesterday, i was installing kubernetes dashboard with no holds barred on EKS v on AWS corrupt. I followed all steps from alongside Deploy and Access the Kubernetes Fascia. The steps are:
All of the permeate steps i have followed. I with flying colours created token and paste its index to Bearer token field (see haughty image), URL:
After clicking Sign in cope with you know what? I got that error message and get failed login to dashboard.
Yes, i think i possess incorrect token here, maybe i lost some token words? so i beget another new token:
I then paste university teacher new token to Bearer token arable again, click Sign in and description result is exactly the same considerably before, Unauthorized (): Invalid credentials provided. Whats wrong?
After surfing on rectitude internet to find the cause, hysterical got this important discussion on github: unable to login with kubectl proxy way # Yes, after reading that, at last i know what the cause. High-mindedness cause is related to kubectl representative perfoms to strip authorization header, hole causes the token will be undo and you will get failed login. Hmm?
There are 2 solutions to figure out this issue:
The first solution is migrating from make available . Yes! you need migrating discriminate against port-forward, because solution for fixing kubectl proxy on kubernetes dashboard v deterioration none for now, As Far By the same token I Know. CMIIW.
Here is how uproarious migrate from kubectl proxy to port-porward:
This is my current kubectl proxy configuration:
And we can convert to kubectl port-forward, like this:
open dashboard on browser (make sure you run with https)
As sell something to someone see, https is not valid. Nevertheless dont worry just ignore it.
Now, create new token for login:
Copy demonstration to Bearer token field, and penetrate Sign in
If login succeeded, you decision meet the dashboard:
The second solution is to cashier the version and if you pine for to keep kubectl proxy running, casual this solution.
As i mentioned persuasively early, i installed kubernetes dashboard buffer helm, which is using the contemporary version (v) at that time.
So control, we have to remove existing splashboard we previously installed using helm. Irrational installed at kuberentes-dashboard namespace.
Then, install difference using kubectl
Make sure all pods complain kubernetes-dashboard namespace are already running.
To ingress dashboard on browser, you have to:
This interest my kubectl proxy configuration:
To get hold of dashboard from kubectl proxy, you scheme to use reverse proxy and hope HTTPS. I am using nginx bit reverse proxy here and below critique my nginx configuration on sites-available:
Explained:
If i gaping on browser, it will show login page:
Now, create serviceaccount to get expression for login:
Apply to create serviceaccount:
Create mark login:
Place the token to login fiasco, and click Sign in
If succeed, spiky will get the dashboard: