Skip to content

Instantly share code, notes, and snippets.

@goromlagche
Last active October 17, 2019 05:20
Show Gist options
  • Select an option

  • Save goromlagche/4415061ee8d6ec342fa967f7fc274296 to your computer and use it in GitHub Desktop.

Select an option

Save goromlagche/4415061ee8d6ec342fa967f7fc274296 to your computer and use it in GitHub Desktop.
a simple bash function to get k8 secrets
function kgs(){
local NAMESPACE="${2:-default}"
echo -e "secret => ${1} namespace => ${NAMESPACE}"
kubectl get secrets $1 -n $NAMESPACE -o json | jq '.data[] | @base64d | fromjson'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment