-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 500: The server asked for credentials #374
Comments
How did you start the UI and Kubernetes cluster? What is your Kubernetes version? |
Hi @bryk I've just run Thank you, |
Looks like a problem with credentials. Is your apiserver protected by some security mechanisms? cc @floreks @maciaszczykm @cheld Have you ever seen this problem? |
The apiserver, just listens on https with basic authentication. |
Hello guys i've got the same problem here. I run the same command as @Smana : kubectl create -f src/deploy/kubernetes-dashboard.yaml But Heapster need the CA.cert that should be inside the serviceaccount folder. So do you have some instructions to implement the CA.cert in the coreos cloud config ? Thanks |
let me know if you need further info :) |
@theobolo @Smana I've just pushed new testing image of the Dashboard UI. It includes certificates setup:
Can you delete old Dashboard replication controller and recreate it? Please tell me whether this helps. |
@bryk thank you, unfortunately i still get the same error:
|
My apiserver is reachable with the following command, i don't know if that can help |
Maybe our backend is connecting to master at different port where only basic authentication is available. This looks like a similar issue: @bryk what do you think? Is this even possible for in-cluster configuration? |
Dashboard relies on serviceaccount for the authentication to the api server. |
@bryk Even with the new image i've got an error
In my kubernetes cluster the Kube API is available at 172.18.0.12:8080 or 172.18.0.12:8443 but if i try a curl at http://10.16.0.1:80 or https://10.16.0.1:443 nothing happens. And i still have the ca.cert error :/ to be clear : i'm running on CoreOS and in my cloud config the root-ca-cert option is not defined and the ca.cert is not created during the deployement. That's should be the problem no ? |
Hello, any news on this please ? |
@luxas Can you help? |
@Smana We've just done a new canary and versioned release. Client library was updated. Can you check once more on |
@bryk unforntunately i'm still getting the same error
|
Sure!
to
to The two issues are different, @theobolo´s is that |
@Smana Are you running on bare-metal, some cloud provider or a custom config? |
I'm running on a virtual machine, (OS fedora), this vm is not running on a cloud provider. Fedora 23 deployed with http://kubespray.io |
@luxas Let me know if you need further info |
What does |
|
Can you
|
@luxas That works as expected
|
I forgot to mention that i'm using the nodePort |
@luxas Nice it worked ! So now i've the same problem as above. I've an error :
With node port also. |
Can you test without nodeport and access dashboard via |
strange... still digging |
kubectl get secrets does not return anything.
|
Have you tried using the recommended admission control plug-ins? |
Thats what I am using. I am starting the api-server with this
|
You're using the kubelet cert for you API server, but is it a Server certificate with the correct SAN for your server common name and IP? If yes, with the following controller manager flags you should be good to go :
|
Thats what I am doing, I am using the same self-signed certificate I created for etcd2 with this etcd recomended way and made sure to add all private and public ip to its configuration option. I am not sure about what you mean by server common names.
|
I was having trouble with my certificates. All solved now. Now I do not need to pass the apiserver-host flag, but it does not ask for my api simple authentication.Which it was what I was expecting. If I explicitly provide the flag, the connection to the api fail with the no root error. Which is weird because all my pods got the /var/run/secrets/kubernetes.io mounted as expected |
I'm closing this bug. Please continue discussion if needed. |
Automatic merge from submit-queue Fix so setup-files don't recreate/invalidate certificates that already exist Fixes: #23197 and a lot of other DNS and dashboard issues This is quite critical for `docker`-based users and should be considered as a **cherrypick-candidate** as it makes a lot of people wonder why Dashboard and/or DNS doesn't work. Example: kubernetes/dashboard#374 Earlier when you shut your `docker.md` cluster down and started it again, all ServiceAccounts became invalidated by `setup-files` that happily ran once again and replaced all files. That made `apiserver` and `controller-manager` pick up the new certs (or there was a race condition, they _could_ have picked up the old certs too, but that's unlikely) and the old certs were put into `/var/run/secrets` because the ServiceAccount's Secrets were stored in etcd, which `setup-files` didn't touch. @fgrzadkowski @huggsboson @thockin @mikedanese @vishh @pwittrock @eparis @bgrant0607
@bryk I encountered the same issue as well in 1.2 , and based on the discussion above I delete the secrets related the namespace "kube-system" , but now I can not create the dashboard again . the error is as following . So do you know where I can find the guide to figure it out . thx FailedCreate Error creating: Pod "kubernetes-dashboard-" is forbidden: no API token found for service account kube-system/default, retry after the token is automatically created and added to the service account |
You need to recreate the secrets now (and possibly the service accounts). Refer to the documentation to learn how. |
I read all comments, but still don't understand: is it possible to use ssl-keys auth for dashboard to access an apiserver? |
Apiserver run with following:
Other components like controller-manager use key/cert auth:
In kubeconfig there are following:
Is there any way to achieve this for dashboard? |
You can use kubeconfig files with 1.1.0-beta2 version or 1.1 (to be released in 2 weeks). All you need to do is to specify KUBECONFIG env var and point it to the file. |
@bryk thank you! |
@Bregor We actually should have a command line option for this. Can you check whether --kubeconfig option works? If not, it is super easy to add it. |
|
@Bregor Docker run ? Not Kubectl run either ? |
@theobolo is there any difference? Kubelet will use this very container anyway. |
Yep but not sure about that :/ @bryk can you confirm ? |
Should be no difference. You should use kubelet/docker directly only for testing. In real environment deploy this as a pod to your cluster. |
Exactly.
|
[Fixes kubernetes#373] Fixed envsubst not working on Ubuntu18.04/CentOS8 on VirtualBox
Hello,
I'm trying to test the dashboard but i get the following errors and i can't access to the UI
Could you please guide me to solve this issue ?
Regards,
Smana
The text was updated successfully, but these errors were encountered: