Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Created January 27, 2025 07:24
Show Gist options
  • Save zulhfreelancer/9baa3af687b51aa508e82df2b371b37d to your computer and use it in GitHub Desktop.
Save zulhfreelancer/9baa3af687b51aa508e82df2b371b37d to your computer and use it in GitHub Desktop.

Revisions

  1. zulhfreelancer created this gist Jan 27, 2025.
    1 change: 1 addition & 0 deletions find-pod-by-ip.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    k get pods -A -o json | jq -r '.items[] | select(.status.podIPs != null) | .metadata.namespace + " " + .metadata.name + " " + (.status.podIPs[] | .ip)' | grep -w '<pod_ip>'