Created
March 2, 2021 07:25
-
-
Save georgegoh/044da30fb053110c755246ea330a75b2 to your computer and use it in GitHub Desktop.
Get IP addresses of all nodes in a kubernetes cluster
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 nodes -o=go-template --template='{{range .items}}{{range .status.addresses}}{{if eq .type "ExternalIP" }}{{.address}}{{printf "\n"}}{{end}}{{end}}{{end}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment