Dashboard: Kubeconfig sign in with file does not work on v2.0.5

Created on 9 Dec 2020  路  6Comments  路  Source: kubernetes/dashboard

Environment
Installation method: recommended method (kubectl apply -f etc)
Kubernetes version: 1.19.4
Dashboard version: v2.0.5 (latest)
Operating system: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Node.js version ('node --version' output): On the node I am not running Node.js
Go version ('go version' output): go version go1.15.2 linux/amd64
Steps to reproduce


Deploy cluster with Ingress etc and try to login through kubeconfig button. On the previous version v2.0.4 I was able to login by using my ~/.kube/config file.

Sample of file:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://IP:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
    token: REDACTED
Observed result

There are no logs on the pod that indicate any errors. I can login perfectly fine with the token (copy / paste) but not with kubeconfig.

Expected result


Being able to login to the node just like as with token.

Comments
kinbug

Most helpful comment

I found the bug, I will send the fix soon.

All 6 comments

It should work. I think you should provide only the token without cert config.

It should work. I think you should provide only the token without cert config.

It used to work exactly with the same structure of the file on the previous version v2.0.4

I can try to remove the cert config but it want make a difference I assume.

Is there any way that I can debug this? I can not see any logs on the pod. I can only see logs when I am using the token directly and everything seems to be working fine.

@maciaszczykm could you test it tomorrow?

I had the same problem.

dashboard version

  • v2.0.5 : Open browser debugging mode, no response, no error, no log
  • v2.0.0-rc2 : success

    k8s version

  • v1.18.6

    kubeconfig

current-context: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: kubernetes
current-context: kubernetes
users:
- name: admin
  user:
    token: [token value]

I can confirm that it doesn't work on master. I'll investigate.

I found the bug, I will send the fix soon.

Was this page helpful?
0 / 5 - 0 ratings