Re: [kubernetes/kubernetes] "no kind ClusterRole is registered for version rbac.authorization.k8s.io/v1beta1" when creating RBAC resources on K8S 1.6.6 (#48629)

84 views
Skip to first unread message

Jordan Liggitt

unread,
Aug 29, 2017, 4:52:31 PM8/29/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

@gaballard what version of kubectl are you running?

cc @kubernetes/sig-cli-bugs


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Jordan Liggitt

unread,
Sep 13, 2017, 11:24:11 PM9/13/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

@gaballard can you provide the following:

  • output of kubectl version
  • output of kubectl api-versions
  • the yaml of the cluster role you were creating

Jordan Liggitt

unread,
Sep 23, 2017, 10:19:50 PM9/23/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

closing due to lack of information

Jordan Liggitt

unread,
Sep 23, 2017, 10:19:51 PM9/23/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

Closed #48629.

Arka Chatterjee

unread,
Oct 5, 2017, 4:16:29 PM10/5/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

[root@localhost ~]# kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml
Error from server (AlreadyExists): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": secrets "kubernetes-dashboard-certs" already exists
Error from server (AlreadyExists): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": serviceaccounts "kubernetes-dashboard-head" already exists
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": Role in version "v1beta1" cannot be handled as a Role: no kind "Role" is registered for version "rbac.authorization.k8s.io/v1beta1"
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": RoleBinding in version "v1beta1" cannot be handled as a RoleBinding: no kind "RoleBinding" is registered for version "rbac.authorization.k8s.io/v1beta1"
error validating "https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml": error validating data: [found invalid field tolerations for v1.PodSpec, found invalid field initContainers for v1.PodSpec]; if you choose to ignore these errors, turn validation off with --validate=false
[root@localhost ~]# 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"}
[root@localhost ~]#
[root@localhost ~]# 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"}
[root@localhost ~]# 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

Arka Chatterjee

unread,
Oct 5, 2017, 4:17:10 PM10/5/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

@liggitt Can you help me with this info ..

Jordan Liggitt

unread,
Oct 5, 2017, 4:38:22 PM10/5/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

you are trying to create RBAC resources from the master dashboard branch, which are defined in v1beta1 form, against a 1.5 server. RBAC v1beta1 was not added until 1.6

Arka Chatterjee

unread,
Oct 5, 2017, 5:15:57 PM10/5/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

Thanks .. Is there an option to install it on the default centos 1.5 version?

Jordan Liggitt

unread,
Oct 5, 2017, 9:01:55 PM10/5/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

with a newer version of kubectl (1.6+) that understands rbac v1beta1 objects, you can run the manifest through kubectl convert:

kubectl version

... must have a client version of 1.6 or higher ...

kubectl convert -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard-head.yaml --output-version=rbac.authorization.k8s.io/v1alpha1 | kubectl apply -f -

Arka Chatterjee

unread,
Oct 6, 2017, 10:21:09 AM10/6/17
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

Thank you :)

Eugene Glotov

unread,
May 14, 2018, 10:49:54 AM5/14/18
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

FYI: I got this problem on one node where kubectl had outdated v1.5 version while server was in 1.10.

JohnBoyB

unread,
Dec 28, 2021, 3:32:44 PM12/28/21
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

I got the same problem in version v1.23.1


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/48629/1002271466@github.com>

JohnBoyB

unread,
Dec 29, 2021, 4:06:38 AM12/29/21
to kubernetes/kubernetes, k8s-mirror-cli-bugs, Team mention

Solution
I was able to solve the problem by changing the apiVersion from rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/48629/1002471688@github.com>

Reply all
Reply to author
Forward
0 new messages