Couldn't find any tools out there aside from ksd which is great in a case where you need to look at individual secrets, but doesn't work if you are looking through many secrets.
Instead, I managed to find a way to do this in a bash shell instead:
# get all secrets
kubectl get secrets -o json --all-namespaces > /tmp/all.json
# use jq to look through and dump all the cleartext secret values:
for f in $(jq '.items[].data | select(. != null) | to_entries | .[].value' /tmp/all.json -r ); do echo -n "$f" | base64 -D >> /tmp/plaintext.txt; done;
- Print the key & namespace out as well, on a previous line
- Probably a better way to do the jq command