Skip to content

Instantly share code, notes, and snippets.

@jaikoo
Created September 26, 2016 09:54
Show Gist options
  • Save jaikoo/e16212445288cb3c6ae4134cb78ae824 to your computer and use it in GitHub Desktop.
Save jaikoo/e16212445288cb3c6ae4134cb78ae824 to your computer and use it in GitHub Desktop.
Returns the internal DNS entries
--------------------------------
nodes=$(kubectl --kubeconfig=deploy/kubeconfig get nodes -o jsonpath='{range.items[*].metadata}{.name} {end}'); echo $nodes
Returns the public IP addresses
------------------------
nodes=$(kubectl --kubeconfig=deploy/kubeconfig get nodes -o jsonpath='{range .items[*].status.addresses[?(@.type=="ExternalIP")]}{.address} {end}'); echo $nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment