curl 访问api-server报403错误

使用curl请求api-server接口时出现下图的错误

curl 访问api-server报403错误

临时方案:
kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous

最终方案:(只给view权限就可以了)
kubectl create clusterrolebinding system:anonymous --clusterrole=view --user=system:anonymous

参考地址:
http://docs.kubernetes.org.cn/494.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章