jtblin / kube2iam

kube2iam provides different AWS IAM roles for pods running on Kubernetes
BSD 3-Clause "New" or "Revised" License
1.96k stars 318 forks source link

Request failing with error "pod with specificed IP not found" #363

Open rushikesh1 opened 1 year ago

rushikesh1 commented 1 year ago

Hi,

I have deployed kube2iam as suggested on https://github.com/jtblin/kube2iam . Provided Assume role to kube2iam daemonset and S3 full access role to a pod. "aws s3 ls" call from pod fails with error "pod with specificed IP not found"

I tried running credentials api "curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ " manually and it fails with same msg in pod.

kube2iam logs shows 404

time="2023-05-18T08:16:35Z" level=info msg="GET /latest/meta-data/iam/security-credentials/ (404) took 2693.093905 ms" req.method=GET req.path=/latest/meta-data/iam/security-credentials/ req.remote=10.*.*.* res.duration=2693.093905 res.status=404 But if I try to perform any other meta-data call it succeeds

bash-5.1$ curl http://169.254.169.254/latest/meta-data/ ami-id ami-launch-index ami-manifest-path block-device-mapping/ time="2023-05-18T09:13:46Z" level=info msg="GET /latest/meta-data/ (200) took 0.901455 ms" req.method=GET req.path=/latest/meta-data/ req.remote=10...* res.duration=0.901455 res.status=200

Can someone please me with this ?