Skip to content

Instantly share code, notes, and snippets.

@millermatt
millermatt / gist:e33bf14e046473a3b0b6354233046c4e
Created November 6, 2020 22:40
How-to: run tcpdump on a kubernetes pod from standard EKS EC2 host
# get pod node
kubectl describe pod <pod name> | grep Node
# get node instance id
AWS_PROFILE=<profile> aws ec2 describe-instances --filters Name=private-dns-name,Values=<node name> | jq -r '.Reservations[0].Instances[0].InstanceId'
# ssm to instance
AWS_PROFILE=<profile> aws ssm start-session --target <instance id>
# (optional) switch to bash