Skip to content

Instantly share code, notes, and snippets.

@F21
Last active October 23, 2022 12:36
Show Gist options
  • Save F21/08bfc2e3592bed1e931ec40b8d2ab6f5 to your computer and use it in GitHub Desktop.
Save F21/08bfc2e3592bed1e931ec40b8d2ab6f5 to your computer and use it in GitHub Desktop.
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@alejovicu
Copy link

Thanks.

@avoidik
Copy link

avoidik commented Apr 7, 2018

alternatively you can start minikube with --bootstrapper=kubeadm and this will enable RBAC for you

@chilcano
Copy link

Thanks. Helpful.

@StevenACoffman
Copy link

StevenACoffman commented May 26, 2018

Since minikube 26.0, kubeadm is the default bootstrapper for minikube.

For kubeadm, the extra-config key:value pair is slightly different.
It is mentioned in documentation of minikube.

In this case, the correct command will be:

$ minikube start --extra-config=apiserver.authorization-mode=RBAC
$ kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default

More details at
kubernetes/minikube#1734 comment
kubernetes/minikube#1722
kubernetes/minikube#2510

@oscarnevarezleal
Copy link

oscarnevarezleal commented May 31, 2018

It works like charm after run minikube delete :)
This is my working command

minikube start --vm-driver="hyperv" --memory=2048 --cpus=4 --hyperv-virtual-switch="primary-virtual-switch" --v=7 --alsologtostderr --bootstrapper=kubeadm --extra-config=apiserver.authorization-mode=RBAC

@abhaybhargav
Copy link

I was able to get it to work with this. The --bootstrapper option seems to be required when you are running it with --vm-driver=none

minikube start --vm-driver=none --bootstrapper=kubeadm --extra-config=apiserver.authorization-mode=RBAC

@jd7612952
Copy link

thanks! very helpful!

@navono
Copy link

navono commented Dec 16, 2018

It's work! thank you!

@dchucks
Copy link

dchucks commented Sep 10, 2019

Fantastic, thanks.

@landlockedboat
Copy link

👍

@sajrahman
Copy link

It still works..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment