Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arno01/036aebfde71a9a553519dfc5a6c6ef8b to your computer and use it in GitHub Desktop.
Save arno01/036aebfde71a9a553519dfc5a6c6ef8b to your computer and use it in GitHub Desktop.
Curl Kubernetes API Server from a Pod
curl -k -X GET \
-H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
https://$KUBERNETES_PORT_443_TCP_ADDR:$KUBERNETES_SERVICE_PORT_HTTPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment