mattshma / bigdata

hadoop,hbase,storm,spark,etc..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

forbidden: User \"system:anonymous\" cannot get path \"/\"

mattshma opened this issue · comments

通过 kubeadm 创建集群后,访问 https://:6443 报错如下:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
  "reason": "Forbidden",
  "details": {
    
  },
  "code": 403
}

image

参考 anonymous-requests

如果是本地测试环境,直接将 system:anonymous 与 cluster-admin 绑定即可:

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