Kubernetes 1.8仪表板配置失败,并显示错误``无种类''角色''.已注册版本"rbac.authorization.k8s.io/v1". [英] Kubernetes 1.8 dashboard configurations fails with error "no kind "Role" is registered for version "rbac.authorization.k8s.io/v1"

查看:2646
本文介绍了Kubernetes 1.8仪表板配置失败,并显示错误``无种类''角色''.已注册版本"rbac.authorization.k8s.io/v1".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装kubernetes仪表板时遇到问题,感谢您的评论和解决方案.

I have issue with kubernetes dashboard installation, appreciate your comments and solutions.

错误: 无法解码" https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml ":没有为"rbac.authorization.k8s.io/v1"版本注册任何角色" 无法解码" https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml ":没有为版本"rbac.authorization.k8s.io/注册任何类型的"RoleBinding" v1"无法解码" https: //raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes -dashboard-head.yaml ":没有为版本"apps/v1beta2"注册任何类型的部署"

ERROR: unable to decode "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": no kind "Role" is registered for version "rbac.authorization.k8s.io/v1" unable to decode "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": no kind "RoleBinding" is registered for version "rbac.authorization.k8s.io/v1" unable to decode "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": no kind "Deployment" is registered for version "apps/v1beta2"

kubectl版本 客户端版本:version.Info {主要:"1",次要:"5",GitVersion:"v1.5.2",GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e",GitTreeState:干净",构建日期:"2017-07-03T15:31: 10Z,GoVersion:" go1.7.4,编译器:" gc,平台:" linux/amd64}服务器版本:version.Info {主要:" 1,次要:" 5,GitVersion:" v1.5.2",GitCommit:" 269f928217957e7126dc87e6adfa82242bfe5b1e,GitTreeState:" clean,BuildDate:" 2017-07-03T15:31:10Z,GoVersion:" go1.7.4,编译器:" gc,平台:" linux/amd64}

kubectl version Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}

kubectl api版本 apps/v1beta1身份验证.k8s.io/v1beta1授权.k8s.io/v1beta1自动缩放/v1批处理/v1证书.k8s.io/v1alpha1扩展/v1beta1策略/v1beta1 rbac.authorization.k8s.io/v1alpha1 storage.k8s.io /v1beta1 v1

kubectl api-versions apps/v1beta1 authentication.k8s.io/v1beta1 authorization.k8s.io/v1beta1 autoscaling/v1 batch/v1 certificates.k8s.io/v1alpha1 extensions/v1beta1 policy/v1beta1 rbac.authorization.k8s.io/v1alpha1 storage.k8s.io/v1beta1 v1

荚状态 kube-system kubernetes-dashboard-3725693093-zm11m 0/1 CrashLoopBackOff

Pods Status kube-system kubernetes-dashboard-3725693093-zm11m 0/1 CrashLoopBackOff

推荐答案

如果您没有从文档中

If you don't have an RBAC enabled cluster, you won't be able to use RBAC objects, such as Role. That's why when trying to create a Role object, it fails saying it doesn't know anything about Role objects. From the docs

指定后,"RBAC"(基于角色的访问控制)将使用"rbac.authorization.k8s.io" API组来制定授权决策,从而允许管理员通过Kubernetes API动态配置权限策略.

When specified "RBAC" (Role-Based Access Control) uses the "rbac.authorization.k8s.io" API group to drive authorization decisions, allowing admins to dynamically configure permission policies through the Kubernetes API.

您还需要更新的kubectl版本,如本评论中所述 /a>. RBAC至少需要kubectl 1.6,而您有1.5.

You also need a more recent kubectl version, as mentioned in this comment. RBAC requires at least kubectl 1.6 and you have 1.5.

这篇关于Kubernetes 1.8仪表板配置失败,并显示错误``无种类''角色''.已注册版本"rbac.authorization.k8s.io/v1".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆