base64 --decode works across Linux and MacOS (#17240)

Signed-off-by: Dr Nic Williams <drnicwilliams@gmail.com>
This commit is contained in:
Dr Nic Williams
2019-10-30 11:24:53 +10:00
committed by Kubernetes Prow Robot
parent 20694c79a9
commit cdc590065c
2 changed files with 2 additions and 2 deletions
@@ -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