Pulling host-container from Private ECR Registry #4034
Replies: 2 comments
-
Hey @mantoine96, So long as the EC2 instance has an associated IAM role which has the policies to access your ECR image, things should work. In fact, I just tested this myself using 2 privately hosted containers in the same account as my Bottlerocket instance, making using of This was my yaml file I used to create my cluster and nodes:
The important policy added is
This resulted in the successful execution of both my bootstrap container and host container which are hosted in my own private ECR from the same account as my Bottlerocket instance. Could you confirm that your EC2 instance IAM role - does in fact - have access to your ECR image? Are you doing this cross-account, or is everything in the same account? |
Beta Was this translation helpful? Give feedback.
-
Hello @KCSesh Thanks for your reply. My node has the correct permissions, and we pull cross account. After some more tinkering, it does indeed work out of the box. I assumed that the reason my host container wasn't coming up was because it couldn't pull (as I wasn't able to pull it running Thanks again so much for this! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to pull and run a custom host container alongside the default host-containers.
My instance has IAM permissions to pull from my private ECR.
My user-data for my Bottlerocket EC2 looks like this:
This wasn't working since authentication to the ECR registry failed.
I looked at the documentation and found this block to configure the container-registry:
But what bothers me here is I need to set a static password. Therefore I think I'm missing something. Indeed there must be a way to leverage the IAM credentials of the instance to dynamically generate the ECR password?
The only part I could find mentioning ECR was configuration for the Kubernetes ECR plugin, which I don't think is relevant here.
Am I missing something?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions