Last active
April 20, 2022 21:57
-
-
Save swamibluedata/7414c6741a70265422a79cf8ab74df09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SERVICE_ACCOUNT=hpecp-bootstrap | |
SECRET=$(kubectl -n hpecp-bootstrap get serviceaccount ${SERVICE_ACCOUNT} -o jsonpath='{.secrets[].name}') | |
TOKEN=$(kubectl -n hpecp-bootstrap get secret ${SECRET} -o jsonpath={.data.token} | base64 -d) | |
kubectl -n hpecp-bootstrap get secret ${SECRET} -o jsonpath='{.data.ca\.crt}' | base64 -d > /tmp/ca.crt | |
# Set this to the apiserver endpoint | |
APISERVER="" | |
curl $APISERVER/api/v1/nodes?limit=1000 --header "Authorization: Bearer $TOKEN" --cacert /tmp/ca.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment