<p>We have a EKS cluster running the 1.21 version. We want to give admin access to worker nodes. We modified the aws-auth config map and added <code>&quot;system:masters&quot;</code> for eks worker nodes role. Below is the code snipped for the modified configmap.</p>
<pre><code>data:
  mapRoles: |
    - groups:
      - system:nodes
      - system:bootstrappers
      - system:masters
      rolearn: arn:aws:iam::686143527223:role/terraform-eks-worker-node-role
      username: system:node:{{EC2PrivateDNSName}}
</code></pre>
<p>After adding this section, the EKS worker nodes successfully got admin access to the cluster. But in the EKS dashboard, the nodegroups are in a degraded state. It shows the below error in the Health issues section. Not able to update cluster due to this error. Please help.</p>
<p><code>Your worker nodes do not have access to the cluster. Verify if the node instance role is present and correctly configured in the aws-auth ConfigMap.</code></p>

<p>During an issue such as this one, a quick way to get more details is by looking at the &quot;Health issues&quot; section on the EKS service page. As can be seen in the attached screenshot below, which has the same error in the description, there is an access permissions issue with the specific role <code>eks-quickstart-test-ManagedNodeInstance</code>.</p>
<p><a href="https://i.stack.imgur.com/dG1le.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dG1le.png" alt="enter image description here" /></a></p>
<p>The aforementioned role lacks permissions to the cluster and the same can be updated in the <code>aws-auth.yaml</code> configuration as described below:</p>
<ol>
<li>Run the following command from the role/user which created the EKS cluster:</li>
</ol>
<blockquote>
<p>kubectl get cm aws-auth -n kube-system -o yaml &gt; aws-auth.yaml</p>
</blockquote>
<ol start="2">
<li>Add the role along with the required permissions such as <code>system:masters</code> in the <code>mapRoles:</code> section as shown below:</li>
</ol>
<pre><code>mapRoles: |
    - rolearn: arn:aws:iam::&lt;AWS-AccountNumber&gt;:role/eks-quickstart-test-ManagedNodeInstance
      username: system:node:{{EC2PrivateDNSName}}
      groups:
          - system:bootstrappers
          - system:nodes
          - system:masters
</code></pre>
<ol start="3">
<li>Apply the updates to the cluster with the command:</li>
</ol>
<blockquote>
<p>kubectl apply -f aws-auth.yaml</p>
</blockquote>
<p>This should resolve the permission issues and your cluster nodes should be visible as healthy and ready for pods to be scheduled.</p>
