kubernetes create secret code example
Example 1: kubectl print secret value
kubectl get secret <my_secret_name> -o 'go-template={{index .data "<key_name>"}}' | base64 -d
ex:
kubectl get secret my-secret -o 'go-template={{index .data "username"}}' | base64 -d
Example 2: get kubernetes secret data
kubectl get secrets/config -n namespace1 -o jsonpath='{.data}'