Last active
October 17, 2019 05:20
-
-
Save goromlagche/4415061ee8d6ec342fa967f7fc274296 to your computer and use it in GitHub Desktop.
a simple bash function to get k8 secrets
This file contains hidden or 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
| function kgs(){ | |
| local NAMESPACE="${2:-default}" | |
| echo -e "secret => ${1} namespace => ${NAMESPACE}" | |
| kubectl get secrets $1 -n $NAMESPACE -o json | jq '.data[] | @base64d | fromjson' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment