Skip to content

Instantly share code, notes, and snippets.

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