Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Created May 10, 2022 10:31
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 ruzickap/e570b41e1e13ecadcc3c11d6c04a8c9d to your computer and use it in GitHub Desktop.
Save ruzickap/e570b41e1e13ecadcc3c11d6c04a8c9d to your computer and use it in GitHub Desktop.
Get decoded K8s data form Secret using kubectl
kubectl get secret -n test test-api-token -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment