<p>I created a key/value secret in openshift. I want to retrieve the value of that key/value pair.</p>
<p>i tried using</p>
<pre><code>oc describe secret ashish -n my-project
</code></pre>
<p>but it gave the value as shown below but i dont the value for my key it just shows 7bytes.</p>
<pre><code>Name:         ashish
Namespace:    my-project
Labels:       &lt;none&gt;
Annotations:  &lt;none&gt;

Type:  Opaque

Data
====
ashish:  7 bytes
</code></pre>

ashish
<p>You can get key and value using &quot;oc get secret/SECRETNAME -o yaml&quot; simply, but you should decode the value by base64.
After you retrieve the key using &quot;oc get -o yaml&quot;, the value can decode simply as follows.</p>
<pre><code>oc get secret ashish -n my-project \
   -o go-template --template=&quot;{{.data.KEY|base64decode}}&quot;
VALUE
</code></pre>
<p>For example,</p>
<pre><code>oc get secret ashish -n my-project \
   -o go-template --template=&quot;{{.data.ashish|base64decode}}&quot;
...value...
</code></pre>
