DEV Community

Dean
Dean

Posted on • Originally published at veducate.co.uk on

Quick Fix – AWS Console – Current user or role does not have access to Kubernetes objects on this EKS Cluster

The Issue

Once you’ve deployed an EKS cluster, and try to view this in the AWS Console, you are presenting the following message:

Your current user or role does not have access to Kubernetes objects on this EKS Cluster
Enter fullscreen mode Exit fullscreen mode

AWS Console - Container Services - Current user or role does not have access to Kubernetes objects on this EKS Cluster

The Cause

This is because you need to run some additional configuration on your cluster to allow your AWS user IAM to access the cluster.

The Fix

Grab your User ARN from the Identity and Access Management (IAM) page.

aws console - user IAM

Download this template YAML file for configuring the necessary ClusterRole and ClusterRoleBinding and then apply it to your EKS cluster.

curl -o eks-console-full-access.yaml https://amazon-eks.s3.us-west-2.amazonaws.com/docs/eks-console-full-access.yaml

kubectl apply -f eks-console-full-access.yaml
Enter fullscreen mode Exit fullscreen mode

apply eks console full access configmap

Now edit the following configmap:

kubectl edit configmap/aws-auth -n kube-system
Enter fullscreen mode Exit fullscreen mode

Add in the following under the data tree:

mapUsers: |
  - userarn: arn:aws:iam::3xxxxxxx7:user/dean@veducate.co.uk
    username: admin
    groups:
      - system:masters

Enter fullscreen mode Exit fullscreen mode

apply eks console full access - edit configmap

After a minute or so, once you revisit the EKS Cluster page in the AWS console, you will see all the relevant details.

AWS Console - Container Services - EKS cluster view

Regards

Follow @Saintdle

Dean Lewis

The post Quick Fix – AWS Console – Current user or role does not have access to Kubernetes objects on this EKS Cluster appeared first on vEducate.co.uk.

Top comments (0)