how to change dashboard admin

1/29/2019

I ran

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluste-admin --serviceaccount=default:dashboard

instead of

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard

I would like to make the dashboard admin cluster-admin instead of cluste-admin

If I run

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard

terminal outputs

Error from server (AlreadyExists): clusterrolebinding.rbac.authorizatoin.k8s.io "dashboard-admin" already exists

When I access the dashboard from a browser on the machine I am prompted for a token and am able to login as expected. I have numerous errors all ending in "cluste-admin" not found. I would like these to all go away

-- Kevin Riordan
kubernetes
rbac
ubuntu

1 Answer

1/29/2019

The only way to make that happen now is you delete the clusterrolebinding and recreate it using:

kubectl delete clusterrolebinding dashboard-admin
kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard
-- Prafull Ladha
Source: StackOverflow