<p>I'm trying out AWS EKS following this guide <a href="https://learn.hashicorp.com/terraform/aws/eks-intro" rel="nofollow noreferrer">https://learn.hashicorp.com/terraform/aws/eks-intro</a></p>

<p>I understand all the steps except for the last one where the instructions say to <code>apply a configmap</code>. Before this step, I couldn't see my worker nodes from the cluster <code>kubectl get nodes</code>. But, I can see my worker nodes after applying this configmap. Can someone please explain to me how this configmap actually accomplishes this feat.</p>

<p>Here is the configmap: </p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: aws-auth
  namespace: kube-system
data:
  mapRoles: |
    - rolearn: ${aws_iam_role.demo-node.arn}
      username: system:node:{{EC2PrivateDNSName}}
      groups:
        - system:bootstrappers
        - system:nodes
</code></pre>

<p>Thanks,</p>

<p>Ashutosh Singh</p>

<p>The data in that configmap are what enables the worker node to join the cluster. Specifically, it needs the proper role ARN permissions. In the tutorial you are following, look at how <code>aws_iam_role.demo-node.arn</code> is defined, then look up the permissions associated with those policies. You can experiment around and remove/add other policies and see how it affects the node's ability to interact with the cluster.</p>
