Skip to content

Instantly share code, notes, and snippets.

@TotallyNotAHaxxer
Last active February 9, 2024 02:14
Show Gist options
  • Save TotallyNotAHaxxer/dcd7bda322658917088c2a5745925669 to your computer and use it in GitHub Desktop.
Save TotallyNotAHaxxer/dcd7bda322658917088c2a5745925669 to your computer and use it in GitHub Desktop.
KSAUTO
export APISERVER=https://${KUBERNETES_SERVICE_HOST}
export SERVICEACCOUNT=/run/secrets/kubernetes.io/serviceaccount
export NAMESPACE=$(cat ${SERVICEACCOUNT}/namespace)
export TOKEN=$(cat ${SERVICEACCOUNT}/token)
export TOKEN=$(cat ${SERVICEACCOUNT}/token)
export CACERT=${SERVICEACCOUNT}/ca.crt
curl --cacert ${CACERT} --header "Authorization: Bearer ${TOKEN}" -X GET ${APISERVER}/api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment