base64 --decode works across Linux and MacOS (#17240)
Signed-off-by: Dr Nic Williams <drnicwilliams@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
20694c79a9
commit
cdc590065c
@@ -98,7 +98,7 @@ export CLUSTER_NAME="some_server_name"
|
||||
APISERVER=$(kubectl config view -o jsonpath="{.clusters[?(@.name==\"$CLUSTER_NAME\")].cluster.server}")
|
||||
|
||||
# Gets the token value
|
||||
TOKEN=$(kubectl get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='default')].data.token}"|base64 -d)
|
||||
TOKEN=$(kubectl get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='default')].data.token}"|base64 --decode)
|
||||
|
||||
# Explore the API with TOKEN
|
||||
curl -X GET $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
|
||||
|
||||
Reference in New Issue
Block a user