Unable to attach a ClusterRoleBinding to a Kubernetes ServiceAccount Unable to attach a ClusterRoleBinding to a Kubernetes ServiceAccount kubernetes kubernetes

Unable to attach a ClusterRoleBinding to a Kubernetes ServiceAccount


The error "cannot change roleRef" was referring to the fact that the ClusterRoleBinding I was trying to create already existed.

By running kubectl get clusterrolebinding I was able to see that the ClusterRoleBinding already existed.

After running kubectl delete clusterrolebinding/jenkins I was able to execute the YAML above successfully.