Skip to content

[EKS]: IAM Roles for Service Accounts enhancements for usage across multiple clusters #1408

@mikestef9

Description

@mikestef9

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request
IAM Roles for Service Accounts (IRSA) enables you to associate an IAM role with a Kubernetes service account, and follow the principle of least privilege by giving pods only the AWS API permissions they need, without sharing permissions to all pods running on the same node. This feature works well with a smaller number of clusters, but becomes more difficult to manage as the number of EKS clusters grows, notably:

  • Needing to create an IAM OIDC provider for each cluster
  • Updating the trust policy of every IAM role needed by that cluster with cluster’s OIDC provider URL that maps to a particular namespace and service account name.
    • Given the 2048 character limit of IAM trust policies, only around 5 clusters can be trusted per role.
    • After 5 clusters, you need to duplicate IAM roles to be used by additional clusters.
    • Coordination between devs and admins - Development teams that own IAM roles often need to re-run Terraform apply or CloudFormation scripts to update trust policies for new clusters.

Given these pain points, EKS is considering a change to the way IRSA works, moving credential vending to the EKS control plane (similar to how ECS and Lambda works). With this change, a trust policy would only need to be updated once to trust a service principal like eks-pods.amazonaws.com, then you would call an EKS API to provide the IAM role to service account mapping, ex.

aws eks associate-role \
    --cluster-name $CLUSTER_NAME \
    --role-arn $ROLE_ARN \
    --namespace $KUBERNETES_NAMESPACE \
    --service-account $SERVICE_ACCOUNT 

We are looking for your feedback on this proposal, and to hear any additional pain points encountered with IRSA today that would not be solved by such a solution.

Are you currently working around this issue?
Creating and managing duplicate roles to be used across multiple clusters

Metadata

Metadata

Assignees

No one assigned

    Labels

    EKSAmazon Elastic Kubernetes ServiceProposedCommunity submitted issue

    Type

    No type

    Projects

    Status

    Shipped

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions