<p>What could be the <code>kubectl</code> command to see <code>k8s</code> <code>secret</code> values</p>
<p>I tried</p>
<pre><code>kubectl get secrets/&lt;secrets-name&gt; -n &lt;namespace&gt;
</code></pre>
<p>It returns</p>
<pre>
NAME            TYPE     DATA   AGE
secrets1        Opaque   1      18h
</pre>
<p>but I want to know what value stored inside the secret</p>

Dupinder Singh
<p>Say you had a secret like the one below with a password key then something like this should work to obtain the value:</p>
<p><code>kubectl get secret/my-secret -n dev -o go-template='{{.data.password|base64decode}}'</code></p>
<pre><code>apiVersion: v1
kind: Secret
metadata: 
  name: my-secret
  namespace: dev
type: Opaque
data: 
  password: TXEyRCMoOGdmMDk=
  username: cm9vdA==

</code></pre>
