<p>I am trying to read a specific value from a secret using kubectl 1.18.8.</p>
<p>I can get the following just fine:</p>
<pre><code>$ kubectl get secret my-secret -o jsonpath='{.data}'
map[.dockercfg:ey.....==]
</code></pre>
<p>But when I do:</p>
<pre><code>$ kubectl get secret my-secret -o jsonpath='{.data\.dockercfg}'
$ 
</code></pre>
<p>or:</p>
<pre><code>$ kubectl get secret my-secret -o jsonpath='{.data.dockercfg}'
$ 
</code></pre>
<p>I just get nothing.</p>
<p>Why can't I read the specify value associated with the key: <code>dockercfg</code>?</p>

u123
<p><strong>Edit:</strong> Did not notice that you use a key named <code>.dockercfg</code>.</p>
<p>You miss one dot before the escaped dot. This should work:</p>
<pre><code>kubectl get secret my-secret -o jsonpath='{.data.\.dockercfg}'
</code></pre>
