Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save demofly/7d92b3670004e865dc9d111ea335687d to your computer and use it in GitHub Desktop.
Save demofly/7d92b3670004e865dc9d111ea335687d to your computer and use it in GitHub Desktop.
Get external IP address of Kubernetes nodes
#!/bin/bash
kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpath={.items[*].status.addresses[?\(@.type==\"ExternalIP\"\)].address}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment