Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Unable to list Kube realted resources related resources (pods,jobs,services,etc).

Error: User "system:serviceaccount:default:default" cannot list pods in the namespace "default"

...

Cluster role binding to services is has not been performed.


Fix

Use below command which creates the command given below to create the cluster role and binds bind all services together.

#kubectl create clusterrolebinding serviceaccounts-cluster-admin --clusterrole=cluster-admin --group=system:serviceaccounts