Skip to content

Instantly share code, notes, and snippets.

@ps-przemekaugustyn
Created July 22, 2020 21:37
Show Gist options
  • Save ps-przemekaugustyn/85af9b2111d5736c3f88d13d999c0ed8 to your computer and use it in GitHub Desktop.
Save ps-przemekaugustyn/85af9b2111d5736c3f88d13d999c0ed8 to your computer and use it in GitHub Desktop.
k8s list external ip addresses of not-master nodes
k get nodes --selector=kubernetes.io/role!=master \
-o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}' \
| awk '{split($0, a, " "); for(key in a){ print a[key]}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment