title: Access via IAM role to EKS cluster
body: <p>Please help to understand why I receiving</p>
  <blockquote>
  <p>error: You must be logged in to the server (Unauthorized)</p>
  </blockquote>
  <p>I have created an empty EKS host and created inside role by manual :</p>
  <pre><code>eksctl create iamidentitymapping \
    --cluster eks-cluster \
    --arn arn:aws:iam::account_number:role/eks_test_full_role \
    --username admin \
    --group system:masters
  </code></pre>
  <p>and it's working</p>
  <pre><code>eksctl get iamidentitymapping --cluster eks-cluster
  ARN                                             USERNAME                GROUPS
  arn:aws:iam::account_number:role/eks_test_full_role                     admin                   system:masters
  arn:aws:iam::account_number:role/eks-cluster-eks-workers-iam-role   system:node:{{EC2PrivateDNSName}}   system:bootstrappers,system:nodes
  </code></pre>
  <p>After I have created IAM user which can assume created role with all required permissions</p>
  <pre><code>aws sts assume-role --role-arn arn:aws:iam::account_number:role/eks_test_full_role --role-session-name test
  {
      &quot;Credentials&quot;: {
          &quot;AccessKeyId&quot;: &quot;&quot;,
          &quot;SecretAccessKey&quot;: &quot;&quot;,
          &quot;SessionToken&quot;: &quot;&quot;,
          &quot;Expiration&quot;: &quot;2021-02-04T10:24:59Z&quot;
      },
      &quot;AssumedRoleUser&quot;: {
          &quot;AssumedRoleId&quot;: &quot;Role_id:test&quot;,
          &quot;Arn&quot;: &quot;arn:aws:sts::account_number:assumed-role/eks_test_full_role/test&quot;
      }
  }
  </code></pre>
  <p>What step I have missed to have it works?</p>
  <p>P.S. my role and rolebinding</p>
  <pre><code>apiVersion: rbac.authorization.k8s.io/v1
  kind: Role
  metadata:
    namespace: dev
    name: get-pods
  rules:
  - apiGroups: [&quot;&quot;]
    resources: [&quot;pods&quot;]
    verbs: [&quot;get&quot;, &quot;watch&quot;, &quot;list&quot;]
  
  apiVersion: rbac.authorization.k8s.io/v1
  kind: RoleBinding
  metadata:
    name: get-pods-bind
    namespace: dev
  subjects:
  - kind: User
    name: admin
    apiGroup: rbac.authorization.k8s.io
  roleRef:
    kind: Role
    name: get-pods
    apiGroup: rbac.authorization.k8s.io
  </code></pre>