skip to Main Content
kubectl apply -f k8s/deployment.yml --validate=false

An error occurred (AccessDenied) when calling the AssumeRole operation: User: <user arn> is not authorized to perform: sts:AssumeRole on resource: <cluster role arn>
E1111 21:37:30.036257   14704 memcache.go:265] couldn't get current server API group list: Get "https://5E52EE866A68FF445D9EFF54FF06C3FF.gr7.ap-south-1.eks.amazonaws.com/api?timeout=32s": getting credentials: exec: executable aws failed with exit code 254
error: unable to recognize "k8s/deployment.yml": Get "https://5E52EE866A68FF445D9EFF54FF06C3FF.gr7.ap-south-1.eks.amazonaws.com/api?timeout=32s": getting credentials: exec: executable aws failed with exit code 254

kubectl apply -f k8s/clusterrolebinding.yml --validate=false

An error occurred (AccessDenied) when calling the AssumeRole operation: User: <<user arn>> is not authorized to perform: sts:AssumeRole on resource: <<cluster role arn>>
E1112 12:33:01.210734   35556 memcache.go:265] couldn't get current server API group list: Get "https://5E52EE866A68FF445D9EFF54FF06C3FF.gr7.ap-south-1.eks.amazonaws.com/api?timeout=32s": getting credentials: exec: executable aws failed with exit code 254
error: unable to recognize "k8s/clusterrolebinding.yml": Get "https://5E52EE866A68FF445D9EFF54FF06C3FF.gr7.ap-south-1.eks.amazonaws.com/api?timeout=32s": getting credentials: exec: executable aws failed with exit code 254 

I tried creating default, role and cluster role binding ,even those are givin the same errors.

2

Answers


  1. Chosen as BEST ANSWER

    This worked by adding an access entry point to my cluster

    where ?

    eks > clusters >  Access > IAM Access entries > Create an access entry.
    

  2. You are trying to leverage a cluster role and you get this error.

    I’m guessing you only have a namespace role. See here, you can grant cluster role by following the documentation.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search