Kubernetes: configmaps is forbidden: User "kube" cannot list configmaps in the namespace "default"

5/15/2018

I followed this tutorial on Medium to deploy a Kubernetes cluster on AWS: https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4

However, when I launch the Kubernetes dashboard I see the following errors:

configmaps is forbidden: User "kube" cannot list configmaps in the namespace "default"
persistentvolumeclaims is forbidden: User "kube" cannot list persistentvolumeclaims in the namespace "default"
secrets is forbidden: User "kube" cannot list secrets in the namespace "default"
services is forbidden: User "kube" cannot list services in the namespace "default"
ingresses.extensions is forbidden: User "kube" cannot list ingresses.extensions in the namespace "default"

Why is this happening?

enter image description here

-- etayluz
kops
kubectl
kubernetes

2 Answers

5/15/2018

The problem is that step 13 of the tutorial reads:

kops get secrets kube --type secret -oplaintext

It should instead be:

kops get secrets admin -oplaintext

-- etayluz
Source: StackOverflow

5/15/2018

The User you've logged in as, kube, doesn't have permission to list the objects that K8s keeps track of. You can either elevate the permissions of kube, or create a ServiceAccount with the right permissions to list those objects.

-- David Muckle
Source: StackOverflow