Skip to content

Instantly share code, notes, and snippets.

@grampelberg
Created November 13, 2019 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grampelberg/16116df58c05691350688322ba81603b to your computer and use it in GitHub Desktop.
Save grampelberg/16116df58c05691350688322ba81603b to your computer and use it in GitHub Desktop.
k8s diagnostic tools
# Get iptables dumps for *every* namespace currently on the host
# NOTE: k8s services go into the host network namespace so they're inherited by everyone
# pod ip addresses go into their own network namespace
lsns | grep net | awk '{ print $4 }' | xargs -IX nsenter -t X -n iptables-save | curl -F 'f:1=<-' ix.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment