用户 "system:anonymous" 无法代理命名空间 "kube-system" 中的服务:"No policy matched.\nUnknown user \"system:anonymous\""

User "system:anonymous" cannot proxy services in the namespace "kube-system".: "No policy matched.\nUnknown user \"system:anonymous\""

尝试访问集群信息中的 Kubernetes 仪表板时出现以下错误:

kubectl cluster-info

也在 Chrome 中以隐身模式弹出:

User "system:anonymous" cannot proxy services in the namespace "kube-system".: "No policy matched.\nUnknown user \"system:anonymous\""

我能够通过 运行 使用本地代理访问它:

kubectl proxy

然后导航至 http://127.0.0.1:8001/ui (http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/#!/workload?namespace=default)。

可能与升级到 1.6 版有关。