Error loading Namespaces. Unauthorized: Verify you have access to the Kubernetes cluster Error loading Namespaces. Unauthorized: Verify you have access to the Kubernetes cluster kubernetes kubernetes

Error loading Namespaces. Unauthorized: Verify you have access to the Kubernetes cluster


You will need to add your IAM role/user to your cluster's aws-auth config map

Basic steps to follow taken from https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html

kubectl edit -n kube-system configmap/aws-auth
# Please edit the object below. Lines beginning with a '#' will be ignored,# and an empty file will abort the edit. If an error occurs while saving this file will be# reopened with the relevant failures.#apiVersion: v1data:  mapRoles: |    - rolearn: <arn:aws:iam::111122223333:role/eksctl-my-cluster-nodegroup-standard-wo-NodeInstanceRole-1WP3NUE3O6UCF>      username: <system:node:{{EC2PrivateDNSName}}>      groups:        - <system:bootstrappers>        - <system:nodes>  mapUsers: |    - userarn: <arn:aws:iam::111122223333:user/admin>      username: <admin>      groups:        - <system:masters>    - userarn: <arn:aws:iam::111122223333:user/ops-user>      username: <ops-user>      groups:        - <system:masters>


Also seeing this error and it got introduced by the latest addition to EKS, see https://aws.amazon.com/blogs/containers/introducing-the-new-amazon-eks-console/

Since then, the console makes requests to EKS in behalf of the user or role you are logged in.

So make sure the kube-system:aws-auth configmap has that user or role added.

This user/role might not be the same you are using locally with AWS CLI, hence kubectl might work while you still see that error !


Amazon added recently (2020.12) new feature that allows you to browse workloads inside cluster from Aws Console.

If you miss permissions you will get that error.What permissions are needed is described herehttps://docs.aws.amazon.com/eks/latest/userguide/security_iam_id-based-policy-examples.html#policy_example3