Skip to content

Instantly share code, notes, and snippets.

@samjacobson
Created May 18, 2016 13:32
Show Gist options
  • Save samjacobson/7d0f3ad0a628deb237356f55200712ac to your computer and use it in GitHub Desktop.
Save samjacobson/7d0f3ad0a628deb237356f55200712ac to your computer and use it in GitHub Desktop.
KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" \
https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1/namespaces/default/pods/$HOSTNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment