Reputation: 34041
Is there a way I can view the secret via kubectl?
Given the secret name, and the data (file?) how do I view the raw result?
Upvotes: 2
Views: 1788
Reputation: 34041
The following solution relies on jq
.
secretName="example-secret-name"
secKeyName="example.key"
kubectl get secret "$secretName" -o json | jq -r ".[\"data\"][\"$secKeyName\"]" | base64 -d
Upvotes: 3