Open qiangwum opened 3 months ago
I don't know exactly what is the root cause, I just changed another yaml and it works
the following command works
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
ubuntu@master:~$ kubectl logs kubernetes-dashboard-7b56f488df-qksf5 -n kube-system 2024/08/08 04:10:53 Starting overwatch 2024/08/08 04:10:53 Using namespace: kube-system 2024/08/08 04:10:53 Using in-cluster config to connect to apiserver 2024/08/08 04:10:53 Using secret token for csrf signing 2024/08/08 04:10:53 Initializing csrf token from kubernetes-dashboard-csrf secret panic: secrets "kubernetes-dashboard-csrf" is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot get resource "secrets" in API group "" in the namespace "kube-system"
goroutine 1 [running]: github.com/kubernetes/dashboard/src/app/backend/client/csrf.(csrfTokenManager).init(0xc00045fae8) /home/runner/work/dashboard/dashboard/src/app/backend/client/csrf/manager.go:41 +0x30e github.com/kubernetes/dashboard/src/app/backend/client/csrf.NewCsrfTokenManager(...) /home/runner/work/dashboard/dashboard/src/app/backend/client/csrf/manager.go:66 github.com/kubernetes/dashboard/src/app/backend/client.(clientManager).initCSRFKey(0xc000315280) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:527 +0x94 github.com/kubernetes/dashboard/src/app/backend/client.(*clientManager).init(0x19aba3a?) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:495 +0x32 github.com/kubernetes/dashboard/src/app/backend/client.NewClientManager(...) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:594 main.main() /home/runner/work/dashboard/dashboard/src/app/backend/dashboard.go:96 +0x1cf