Skip to content

Instantly share code, notes, and snippets.

@isaaguilar
Created December 28, 2017 18:10
Show Gist options
  • Select an option

  • Save isaaguilar/2e9cde80a2424b7416546fe1803b76d5 to your computer and use it in GitHub Desktop.

Select an option

Save isaaguilar/2e9cde80a2424b7416546fe1803b76d5 to your computer and use it in GitHub Desktop.
NAMESPACE=$1
POD=`kubectl --namespace $NAMESPACE get pods|grep worker|cut -f 1 -d ' '`
INTERNAL_IP=`kubectl --namespace $NAMESPACE get pod $POD -o json| jq -r '.status.hostIP'`
kubectl describe nodes|grep -A 1 $INTERNAL_IP|grep ExternalIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment