Skip to content

Instantly share code, notes, and snippets.

@VLogin
Created May 1, 2022 11:24
Show Gist options
  • Save VLogin/14b14ad99b26ce80f3e9c021e16f35a5 to your computer and use it in GitHub Desktop.
Save VLogin/14b14ad99b26ce80f3e9c021e16f35a5 to your computer and use it in GitHub Desktop.
[curl k8s api from inside the pod] #k8s
CERT=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
curl --cacert $CERT -H "Authorization: Bearer $TOKEN" https://$KUBERNETES_SERVICE_HOST/api/v1/prelude/default/pods/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment