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

Cannot delete kube2iam from EKS #370

Closed bmgeek closed 6 months ago

bmgeek commented 6 months ago

Hello. I need some help. I installed kube2iam via helm chart to my cluster EKS and after deleted / uninstalled all releases from k8s cluster my pods cannot get a permissions to AWS, example autoscaller. If I install kube2iam already then all work good.

And I have few clusters with different IMDSv1/2. I cannot install kube2iam to cluster with IMDSv2, but pods already dismissed permissions to AWS.

bmgeek commented 6 months ago

I found. Previous I tried to list iptables rules with iptables -S / -L and I didnt get all rules. Need to use command: iptables -t nat -L or another table. Then we can find rules from kube2iam with 169.254.169.254 address and 8181 port.

We need to delete this rule from iptables: iptables -t nat -v -L PREROUTING -n --line-number iptables -t nat -D PREROUTING {rule-number-here}