Skip to content

Instantly share code, notes, and snippets.

@brianpursley
Last active February 6, 2020 02:06
Show Gist options
  • Save brianpursley/291fbf3ced3b4144703b7c8637e7efb2 to your computer and use it in GitHub Desktop.
Save brianpursley/291fbf3ced3b4144703b7c8637e7efb2 to your computer and use it in GitHub Desktop.
Script to get address of kubernetes nodeport service when running locally using (using kind for example)
#!/bin/sh
nodeport=$(kubectl get services -o jsonpath="{..nodePort}") && kubectl get node -o jsonpath="{..addresses[0].address}" | xargs -n1 printf -- "http://%s:$nodeport\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment