Kubernetes secrets are base64-encoded, which means reading them requires an extra step. Instead of copying values and decoding them separately, use this one-liner:
kubectl get secret my-secret -o jsonpath='{.data.my-key}' | base64 -dWant to decode all keys in a secret at once? Use this:
kubectl get secret my-secret -o json | jq -r '.data | to_entries[] | "\(.key): \(.value | @base64d)"'This pipes the secret JSON through jq, iterates over all key-value pairs, and decodes each value inline.
Note: You need jq installed for the second command. Install it with brew install jq on macOS or apt install jq on Ubuntu.