Created
May 18, 2023 20:57
-
-
Save HariSekhon/3b2e2de7327d42e7e7a4442f3b51488b to your computer and use it in GitHub Desktop.
Get all Kubernetes pods and IPs
This file contains 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
kubectl get pods -o json --all-namespaces | jq -r '.items[] | [.metadata.namespace, .metadata.name, .status.podIP] | @csv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adapted from my script for pod IPs at a connection's request:
https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/kubernetes/kubectl_pod_ips.sh