Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

minikube error – CrashLoopBackOff: secrets is forbidden: User “system:serviceaccount:kube-system:default”

$ minikube dashboard
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503
Temporary Error: unexpected response code: 503

$ kubectl get pod -n=kube-system
NAME                                    READY   STATUS             RESTARTS   AGE
coredns-5c98db65d4-b554r                1/1     Running            2          10h
coredns-5c98db65d4-zqnvx                1/1     Running            2          10h
etcd-minikube                           1/1     Running            1          10h
kube-addon-manager-minikube             1/1     Running            1          10h
kube-apiserver-minikube                 1/1     Running            1          10h
kube-controller-manager-minikube        1/1     Running            1          10h
kube-proxy-g6kmz                        1/1     Running            1          10h
kube-scheduler-minikube                 1/1     Running            1          10h
kubernetes-dashboard-7b8ddcb5d6-dvxmf   0/1     CrashLoopBackOff   4          105s
storage-provisioner                     1/1     Running            2          10h
$ kubectl logs kubernetes-dashboard-7b8ddcb5d6-dvxmf -n=kube-system
dashboard CrashLoopBackOff: secrets is forbidden: User "system:serviceaccount:kube-system:default" cannot create resource

Solution

kubectl create clusterrolebinding kube-system-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
Rajesh Kumar
Follow me