Created
July 22, 2020 21:37
-
-
Save ps-przemekaugustyn/85af9b2111d5736c3f88d13d999c0ed8 to your computer and use it in GitHub Desktop.
k8s list external ip addresses of not-master nodes
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 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