<p>Is there a way I can view the secret via kubectl? </p>

<p>Given the secret name, and the data (file?) how do I view the raw result?</p>

Chris Stryczynski
<p>The following solution relies on <code>jq</code>.</p>

<pre><code>secretName="example-secret-name" secKeyName="example.key"
kubectl get secret "$secretName" -o json | jq -r ".[\"data\"][\"$secKeyName\"]" | base64 -d
</code></pre>
