<p>Related to <a href="https://stackoverflow.com/q/66288565/3288890">Duplicated env variable names in pod definition, what is the precedence rule to determine the final value?</a></p>
<p>I have a deployment spec with a repeated env name, see below:</p>
<pre><code>containers:
  - name: c1
  ...
    env:
      - name: DUP1
        value: hello1
      - name: DUP1
        value: hello2
</code></pre>
<p>Can I expect the second DUP1 key to always be the one set on the pod? e.g. echo $DUP1 == &quot;hello2&quot;. It seems to be the case but I can't find validation about it</p>

Fran
<p>Have recently tested this -- in my case the precedence is reversed. Am not sure why it is the case and apparently not so for the other responders but, in yaml:</p>
<pre><code>env: 
 - name: key1
   value: value1
 - name: key1
   value: value2
</code></pre>
<p>is rendering</p>
<pre><code>containers:
- env:
  - name: key1
    value: value1
</code></pre>
