Skip to content

[Feature] Support ECR pull-through cache repos by default #8318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
artem-nefedov opened this issue Mar 28, 2025 · 1 comment
Open

[Feature] Support ECR pull-through cache repos by default #8318

artem-nefedov opened this issue Mar 28, 2025 · 1 comment
Labels
kind/feature New feature or request

Comments

@artem-nefedov
Copy link
Contributor

eksctl should create node role with IAM permissions to pull images from ECR pull-through cache repositories (PTC) without users having to define custom IAM configuration.

Currently (v0.206.0), node role is missing ecr:BatchImportUpstreamImage permission, which is absent in AmazonEC2ContainerRegistryReadOnly managed policy and present in AmazonEC2ContainerRegistryPullOnly managed policy. This permission is required to be able to pull new images from PTC repos.

In general, AmazonEC2ContainerRegistryReadOnly can be replaced with AmazonEC2ContainerRegistryPullOnly with no downsides. This will also remove unneeded permissions defined in ReadOnly role, thus making it better suited for the least privilege principle, and match the current AWS recommendations for node role. The only consideration is that it may break custom scripts some users run on the nodes, and maybe some pods that still use host IAM instead of IRSA/Pod Identity. I would propose adding AmazonEC2ContainerRegistryPullOnly managed policy to defaults now, and scheduling to remove AmazonEC2ContainerRegistryReadOnly from defaults later.

NOTE: EKS Auto Mode already uses AmazonEC2ContainerRegistryPullOnly.

@artem-nefedov artem-nefedov added the kind/feature New feature or request label Mar 28, 2025
@artem-nefedov
Copy link
Contributor Author

artem-nefedov commented Apr 15, 2025

Note: Same change was already merged into upstream Karpenter.
https://github.com/aws/karpenter-provider-aws/pull/7963/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant