plain-pizza-51556
09/17/2024, 3:38 PMmicroscopic-river-74022
09/17/2024, 3:38 PMmicroscopic-river-74022
09/17/2024, 3:39 PMjson
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowPushPull",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::<account-id>:role/<k8s_worker_iam_role>"
]
},
"Action": [
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
"ecr:CompleteLayerUpload",
"ecr:GetDownloadUrlForLayer",
"ecr:InitiateLayerUpload",
"ecr:PutImage",
"ecr:UploadLayerPart"
]
}
]
}
Replace <account-id>
and <k8s_worker_iam_role>
with your AWS account ID and Kubernetes worker IAM role respectively. source ()
2. **Use IRSA for fine-grained control**: If you need more fine-grained control, consider using IRSA (IAM Roles for Service Accounts). This allows you to reduce the ECR access from the worker nodes to read-only, and only provide push access to the in-cluster builder Pods. source ()microscopic-river-74022
09/17/2024, 3:39 PMimagePullSecret
for your ECR repository. This secret should be correctly referenced in your Kubernetes provider configuration. source ()
If you continue to experience issues, you might want to check the AWS documentation for more information on granting developers permission to push and pull directly from a repository. source ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
09/17/2024, 3:39 PM