-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
operation error Elastic Load Balancing v2: DescribeLoadBalancers, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, canceled, context deadline exceeded #3955
Comments
Hey @g-bohncke , If you look here, we always infer the vpc-id and region from config first if its set before we infer it from |
Hi, I think I have the same issue and I suspect it's a configuration problem. However I can't find what it is. Maybe some guidance could help. This is the error I see: Here is what I did.
Shield, waf, and wafv2 disabled as per documented here: https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/deploy/installation/#additional-requirements-for-isolated-cluster I have enabled IMDSv2 and enabled hop limit to 2:
I have attached policies to nodes, option B from the following doc: https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/deploy/installation/#option-b-attach-iam-policies-to-nodes I don't use TargetGroupBinding I have enabled incoming TCP connection to port 9443 on worker nodes
What am I missing? |
So, I fix my issue. I found this documentation that explains how to access metadata from and ec2 host.
you have to get a token to do the request:
for some reason, I could get a 401 when accessing http://169.254.169.254/latest/meta-data/ Changed the HttpPutResponseHopLimit to 3 then I could get a token from http://169.254.169.254/latest/api/token Hope this will help other folks to waste less time on this! |
This helped orient me^^ thank you. Some findings:
|
Describe the bug
A concise description of what the bug is.
When running the latest version chart 1.10.1 app version : v2.10.1 we are encountering:
the following error.
operation error Elastic Load Balancing v2: DescribeLoadBalancers, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, canceled, context deadline exceeded.
this seems to be related to the change to AWS SDK Go v2 version and looks like the code ignores the vcpId and region from the helm chart. "Instead of depending on IMDSv2, you can specify the AWS Region and the VPC via the controller flags --aws-region and --aws-vpc-id." the SDK looks to be always pulling the metadata. cloud.go
Steps to reproduce
install the latest version on a private cluster.
Expected outcome
A concise description of what you expected to happen.
That the service works
Environment
v2.10.1
1.29
Yes 1.29
Additional Context:
The text was updated successfully, but these errors were encountered: