<p>My secret file looks like:</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: secret
type: Opaque
stringData:
  &quot;user.name&quot;:  &quot;user&quot;
  &quot;user.password&quot;:  &quot;password&quot;
</code></pre>
<p>And I am trying to get a value with the next code:</p>
<pre><code>{{- $secret := lookup &quot;v1&quot; &quot;Secret&quot; .Release.Namespace &quot;secret&quot; -}}
  {{- if $secret -}}
       {{- print $secret.data.user.password}}
</code></pre>
<p>The problem is &quot;user.password&quot;  key contains a dot and I haven't found how to fix it.
Thanks for any help!</p>

<p>You can use the <code>index</code> function to access map values with dots in them like:</p>
<pre><code>{{- print (index $secret.data &quot;user.password&quot;)}}
</code></pre>
