title: What does "eksctl create iamserviceaccount" do under the hood on an EKS cluster?
body: <p>AWS supports <a href="https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html" rel="noreferrer">IAM Roles for Service Accounts (IRSA)</a> that allows cluster operators to map AWS IAM Roles to Kubernetes Service Accounts.</p>
  <p>To do so, one has to create an <a href="https://eksctl.io/usage/iamserviceaccounts/" rel="noreferrer">iamserviceaccount</a> in an EKS cluster:</p>
  <pre><code>eksctl create iamserviceaccount \
      --name &lt;AUTOSCALER_NAME&gt; \
      --namespace kube-system \
      --cluster &lt;CLUSTER_NAME&gt; \
      --attach-policy-arn &lt;POLICY_ARN&gt; \
      --approve \
      --override-existing-serviceaccounts
  </code></pre>
  <p>The problem is that I don't want to use the above <code>eksctl</code> command because I want to declare my infrastructure using <code>terraform</code>.</p>
  <p>Does eksctl command do anything other than creating a service account? If it only creates a service account, what is the <code>YAML</code> representation of it?</p>