Created
March 26, 2019 19:44
-
-
Save csrwng/f97044ff7e5e526943ebe12c0c0f86b0 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
#!/bin/bash | |
decode="-d" | |
if [ "$(uname)" == "Darwin" ]; then | |
decode="-D" | |
fi | |
curl --cacert <(kubectl config view --flatten -o jsonpath='{ .clusters[0].cluster.certificate-authority-data }' | base64 ${decode}) \ | |
--cert <(kubectl config view --flatten -o jsonpath='{ .users[0].user.client-certificate-data }' | base64 ${decode}) \ | |
--key <(kubectl config view --flatten -o jsonpath='{ .users[0].user.client-key-data }' | base64 ${decode}) "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment