Created
September 15, 2019 23:25
-
-
Save srkiNZ84/4c6773c1cc67d3a40101bdaa112a1a25 to your computer and use it in GitHub Desktop.
Bash script/command to get a Secret and decode it
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
#!/bin/bash | |
# Usage: ./get_k8s_secret_plaintext SECRET_NAME SECRET_KEY | |
kubectl get secret $1 -o json | jq -r '.data[$2]' | base64 --decode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment