Skip to content

Instantly share code, notes, and snippets.

View valentin2105's full-sized avatar

Valentin Ouvrard valentin2105

View GitHub Profile
@valentin2105
valentin2105 / curl-k8s-internal-pod.sh
Created February 19, 2024 23:02
curl Kube-API from a pod via service-account
curl https://${KUBERNETES_SERVICE_HOST} \
--header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
--cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt