Created
May 10, 2022 10:31
-
-
Save ruzickap/e570b41e1e13ecadcc3c11d6c04a8c9d to your computer and use it in GitHub Desktop.
Get decoded K8s data form Secret using kubectl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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