ElementTech / kube-arch-scheduler

An architecture-aware Kubernetes scheduler plugin
https://elementtech.github.io/kube-arch-scheduler/
Apache License 2.0
31 stars 9 forks source link

Error retrieving credentials / ECR Registry #5

Open miracle2k opened 4 months ago

miracle2k commented 4 months ago

I am getting a bunch of errors like this:

time="2024-05-04T08:04:25Z" level=error msg="Error retrieving credentials" error="ecr: Failed to get authorization token: operation error ECR: GetAuthorizationToken, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, request canceled, context deadline exceeded"

E0504 08:04:25.125601       1 archfilter.go:167] "failed to get image architectures" err=<
    GET https://....dkr.ecr.eu-west-2.amazonaws.com/v2/.../manifests/latest: unexpected status code 401 Unauthorized: Not Authorized

I realize this is a kops / AWS specific issue, but still curious if someone knows the process to setup the permissions.

ElementTech commented 4 months ago

It seems like you need to enable IMDSv2 on your EC2 nodes, or allow your AWS role to use IMDS to begin with. It's an AWS issue, I mean you have to ensure your role has access to what it complains about until it's solved