How to get a Kubernetes secret with kubectl only? May 24, 2022 Kubectl allows you to use go-templates, so you can do this: $ kubectl get secret/MYSECRET -o 'go-template={{ .data.NAME | base64decode }}'