Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Get the docker host ip inside Kubernetes
TOKEN=`cat /var/run/secrets/`
curl -s -k -H "Authorization: Bearer $TOKEN" $KUBERNETES/api/v1/namespaces/$KUBERNETES_NAMESPACE/pods/$POD | grep -i hostIp | cut -d "\"" -f 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment