<p>I have 2 secrets i.e. production and staging. I want to dynamically load this secret in deployment file using the environment variable being set in same file</p>

<pre><code>env:
          - name: NODE_ENV
            value: "production"


 - name: general-secret
          secret:
            secretName: general-production-secret    
</code></pre>

<p>I want to load environment specific secrets like using </p>

<pre><code>        secretName: general-{{env. NODE_ENV}}-secret    
</code></pre>

<p>Is it possible?</p>

Hacker
<p>As far as I know, this is not possible unless you have <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a> chart for your applications, then you can make this possible</p>

<p>this is a solution in helm chart close to what you need 
<a href="https://stackoverflow.com/questions/52742241/dynamically-accessing-values-depending-on-variable-values-in-a-helm-chart">Dynamically accessing values depending on variable values in a Helm chart</a></p>
