Skip to content

Instantly share code, notes, and snippets.

@fonsecas72
Created February 5, 2021 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonsecas72/df5b1b7af65c8be5ccbad27699c91514 to your computer and use it in GitHub Desktop.
Save fonsecas72/df5b1b7af65c8be5ccbad27699c91514 to your computer and use it in GitHub Desktop.
get plain text of all k8s secrets
kubectl get secret my-user-pass -o json | jq '.data | map_values(@base64d)'
@fonsecas72
Copy link
Author

fonsecas72 commented Sep 22, 2022

find needle in secrets

kubectl get secret -A -o json | jq -r '.items[] | select(.data != null) | "\((.data | map_values(@base64d))) , \(.metadata)" ' | grep needle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment