k8s

k8s中dashboard权限anonymous问题

Posted by Epoch Blog on December 6, 2021

介绍

在安装kubernetes-dashboard的时候,低版本中可能会有system-anonymons 权限问题

获取POD,进行日志查看

1
2
kubectl -n kubernetes-dashboard get pod -o name
kubectl logs -f -n kubernetes-dashboard pod/kubernetes-dashboard-576cb95f94-gf7m6

日志出现User “system:anonymous“ cannot list nodes at the cluster scope,表示需要授权.

授权

1
kubectl create clusterrolebinding cluster-system-anonymons --clusterrole=cluster-admin --user=system:anonymous