Created
January 27, 2025 07:24
-
-
Save zulhfreelancer/9baa3af687b51aa508e82df2b371b37d to your computer and use it in GitHub Desktop.
Find Kubernetes pod by IP address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k get pods -A -o json | jq -r '.items[] | select(.status.podIPs != null) | .metadata.namespace + " " + .metadata.name + " " + (.status.podIPs[] | .ip)' | grep -w '<pod_ip>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment