401 Unauthorized error when pushing Kafka Connect build to ECR despite correct IAM and Service Account setup #11770
-
Hello, I'm encountering a persistent 401 Unauthorized error when attempting to push an image to ECR using the build feature of the Strimzi KafkaConnect resource. Strimzi Operator Version: [Strimzi version in use] Kubernetes Environment: EKS [EKS version in use] Error Log:
Troubleshooting steps taken
spec:
template:
buildServiceAccount:
metadata:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::{account-id}:role/{role-name}
Given that all standard configurations seem correct, I suspect there might be another underlying issue. Could there be a problem with a VPC Endpoint policy, Private Link, or a specific Strimzi configuration that I might have overlooked? Any guidance on this would be greatly appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey, I see all the points there, maybe one additional question - and TBH I never tried to push to ECR -> for the account you should have some creds, are you sure that those are used in the build? It can happen that even though everything is correctly configured, you don't have the creds set for the build (I suppose it's the Kaniko build on Kubernetes, or are you using OCP?). |
Beta Was this translation helpful? Give feedback.
-
Sorry. I'm idlot, this probled solved to iam resource. I set ECR arn like this {
"Statement": [
{
" Action": ["ecr:*"],
"Effect": "Allow",
"Resource": ["arn.aws.ecr.{region}.{account-id}.repository/*"] // this is problem
}
]
} I fix like this. {
"Statement": [
{
" Action": ["ecr:*"],
"Effect": "Allow",
"Resource": ["*"]
}
]
} I don't know why don't working I set resource. But issue solved. Thank U |
Beta Was this translation helpful? Give feedback.
Sorry. I'm idlot, this probled solved to iam resource.
I set ECR arn like this
I fix like this.
I don't know why don't working I set resource.
But issue solved.
Thank U