can't get cluster resource after deploying EKS cluster using eksctl

10/15/2019

I'm trying to deploy Kubernetes cluster using eksctl,

The cluster was created but I see that I have permissions issues and I can't get to the Kubernetes resources from my control-plane server. This is the error I get:

eksctl get iamidentitymapping --region us-east-1 --name management
[✖]  getting auth ConfigMap: configmaps "aws-auth" is forbidden: User "system:node:ip-10-100-2-68.ec2.internal" cannot get resource "configmaps" in API group "" in the namespace "kube-system": no path found to object

I've deployed the cluster using configuration file for eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: Management
  region: us-east-1
vpc:
  id: "vpc-581111"
  cidr: "10.100.0.0/16"
  subnets:
    private:
      us-east-1d:
        id: "subnet-5f566317"
        cidr: "10.100.1.0/24"
      us-east-1e:
        id: "subnet-0140f96070e359d90"
        cidr: "10.100.2.0/24"
iam:
  serviceRoleARN: "arn:aws:iam::444444444444:role/Prod-Builder-Role"

nodeGroups:
  - name: worker-1

    instanceType: t3.medium
    desiredCapacity: 1
    iam:
      instanceProfileARN: "arn:aws:iam::444444444444:instance-profile/Panpwr-Management-BuilderInstanceProfile-Y5WPPKASB38K"
      instanceRoleARN: "arn:aws:iam::444444444444:role/Prod-Builder-Role"
    privateNetworking: true
    securityGroups:
      withShared: true
      withLocal: true
      attachIDs: ['sg-07b5fc3403e0d76e0', 'sg-ad9d6bdf']
    tags:
      'environment:': 'management'

The serviceRoleARN: "arn:aws:iam::444444444444:role/Prod-Builder-Role" Has all the needed permissions from AWS point of view, I saw that I need to change the aws-auth config-map but I don't have permissions to access configmaps.

Any help will be approcoated.

-- Shachar Hamuzim Rajuan
eks
eksctl
kubernetes

1 Answer

4/16/2020
forbidden: User "system:node:ip-10-100-2-68.ec2.internal" cannot get resource "configmaps" in API group ""

Basically, your user(system:node:ip-10-10..) has no API group. A superuser(with system:master group) on same cluster, should add "system:node:ip-10-100-2-68.ec2.internal" in the master group by setting --group system:masters

-- Jay
Source: StackOverflow