我无法创建Kubernetes Dashboard。
我正在遵循Kubernetes官方website中提到的步骤:
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
secret "kubernetes-dashboard-certs" created
serviceaccount "kubernetes-dashboard" created
service "kubernetes-dashboard" created
来自服务器的错误(BadRequest):创建" https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml"时的错误:版本中的角色" v1"不能作为一个角色来处理:没有种类和#34;角色"已注册版本" rbac.authorization.k8s.io/v1"来自服务器的错误(BadRequest):创建" https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml"时出错:版本中的RoleBinding" v1"不能作为RoleBinding处理:没有种类" RoleBinding"已注册版本" rbac.authorization.k8s.io/v1"来自服务器的错误(BadRequest):创建" https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml"时的错误:版本中的部署" v1beta2"不能作为部署处理:没有种类"部署"已注册版本" apps / v1beta2"
我们的Kubernetes版本如下:
kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.2", GitCommit:"922a86cfcd65915a9b2f69f3f193b8907d741d9c", GitTreeState:"clean", BuildDate:"2017-07-21T08:23:22Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.12", GitCommit:"3bda299a6414b4866f179921610d6738206a18fe", GitTreeState:"clean", BuildDate:"2017-12-29T08:39:49Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
我无法为此问题找到合适的解决方案。
答案 0 :(得分:1)
您需要启用RBAC的群集,否则安装将失败,因为它无法找到Role
类型的对象。要启用RBAC,请使用--authorization-mode=RBAC
启动apiserver。