resource mapping not found for name: "cattle-admin-binding" namespace: "cattle-system"

Viewed 901

while I try to add my k8s cluster in azure vm, is shows error like error: resource mapping not found for name: "cattle-admin-binding" namespace: "cattle-system" from "STDIN": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1" ensure CRDs are installed first

Here is the output for my command executed

root@kubeadm-master:~# curl --insecure -sfL https://104.211.32.151:8443/v3/import/lqkbhj6gwg9xcb5j8pnqcmxhtdg6928wmb7fj2n9zv95dbxsjq8vn9.yaml | kubectl apply -f - clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver created clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master created namespace/cattle-system created serviceaccount/cattle created secret/cattle-credentials-e558be7 created clusterrole.rbac.authorization.k8s.io/cattle-admin created

Warning: spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].key: beta.kubernetes.io/os is deprecated since v1.14; use "kubernetes.io/os" instead

deployment.apps/cattle-cluster-agent created daemonset.apps/cattle-node-agent created

error: resource mapping not found for name: "cattle-admin-binding" namespace: "cattle-system" from "STDIN": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1" ensure CRDs are installed first

2 Answers

I was also facing the same issue, so I changed the API version for the cattle-admin-binding from beta to stable as below:

Old value:

apiVersion: rbac.authorization.k8s.io/v1beta1

Changed to:

apiVersion: rbac.authorization.k8s.io/v1

Though I ran into some other issues later, the above error was gone.

Im getting the same thing and when searching for a solution this is the only link that shows up. Maybe it is something new.

Related