Last active
April 19, 2020 07:39
-
-
Save afirth/1b532e92711caa2f1fd5f98ee516f855 to your computer and use it in GitHub Desktop.
kubectl view all secrets in namespace
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
#requires jq >= 1.6 | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | |
# only keys | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )] | to_entries | .[] | [.value] ' | grep ':' | |
# better format | |
k get secret -o json -n accounts-web | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | grep --color=never -P '\w' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment