Skip to content

Instantly share code, notes, and snippets.

@stand-sure
Created August 18, 2023 18:49
Show Gist options
  • Save stand-sure/e6b2f7e2a6daeb589d7654d1bba91563 to your computer and use it in GitHub Desktop.
Save stand-sure/e6b2f7e2a6daeb589d7654d1bba91563 to your computer and use it in GitHub Desktop.
get and decode all k8s secrets
#! /usr/bin/env bash
kubectl get secret --output yaml | /usr/local/bin/yq '.items[] | { (.metadata.name): (.data | to_entries) | map_values({ (.key): (.value | @base64d )}) }'
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment