A pod can't reach the EC2 instance metadata service: `curl http://169.254.169.254/latest/meta-data/` hangs, while it works from the node.
IntermediateTroubleshootingContainers, Kubernetes, IPv6 and packet captures
Answer
Likely causes → IMDSv2 with a PUT response hop limit of 1. The token response can't make the extra hop from the node into the pod network namespace, so SDKs hang waiting for a token. This is often intentional, to stop pods from using the node's IAM role.
Diagnose →
aws ec2 describe-instances --instance-ids <id> \
--query 'Reservations[0].Instances[0].MetadataOptions'
kubectl exec <pod> -- curl -s -m3 -X PUT http://169.254.169.254/latest/api/token \
-H 'X-aws-ec2-metadata-token-ttl-seconds: 60'
Fix → Preferred: give the pod its own IAM role via EKS Pod Identity or IRSA, so it doesn't need IMDS credentials. If it truly needs IMDS (e.g. some agents), set HttpPutResponseHopLimit=2 on the launch template.
Prevent → Keep hop limit 1 by default, block IMDS with a NetworkPolicy for app namespaces, and use per-pod identities.
More on Containers, Kubernetes, IPv6 and packet captures
After someone ran `iptables -F` (or restarted firewalld), all Docker containers lost outbound connectivity.Intermediate`docker run -p 8080:80 myapp` starts fine, but `curl localhost:8080` returns `Connection reset by peer`.BeginnerTwo containers on the default bridge network can't reach each other by container name.Beginner`docker run -p 80:80 nginx` fails with `Bind for 0.0.0.0:80 failed: port is already allocated`.BeginnerA new Kubernetes node stays `NotReady` with `container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized`.IntermediateA Service returns `Connection refused` / nothing, and `kubectl get endpoints myapp` shows `<none>`.Beginner