Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
- SECRET_NAME=$(kubectl get serviceaccount default -o jsonpath='{.secrets[0].name}')
- TOKEN=$(kubectl get secret $SECRET_NAME -o jsonpath='{.data.token}' | base64 --decode)
- curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement