Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Last active May 7, 2024 17:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ipedrazas/83326e03c9d893a3ab1bdbd048d2e6be to your computer and use it in GitHub Desktop.
Save ipedrazas/83326e03c9d893a3ab1bdbd048d2e6be 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
@guychouk
Copy link

guychouk commented Jan 8, 2022

Thank you so much for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment