Backlinks

  • Hello

ListContentsOfMultiKubectlSecrets

10 Dec 2021 (modified 10 Dec 2021)1 min read

  • Kubernetes

Use go-template instead of jsonpath.

See https://pkg.go.dev/text/template.

kubectl get secret -l your-selector-label -o go-template='{{range .items}}{{.data.username|base64decode}} {{.data.password|base64decode}}{{"\n"}}{{end}}'

See Stack Overflow thread https://stackoverflow.com/questions/66263757/decode-base64-in-kubectl-jsonpath.

~nicolaw

Übergeek & CatLoaf Facilitator