<p>Can Kubernetes deployment manifest file have both -env and -envFrom keys?</p>
<p>I have set a <code>secrets.yaml</code> file to set the environment variables and also have environment variables that are hard coded.</p>
<p>Can I have both of them set using both <code>-env</code> and <code>-envFrom</code> in the YAML files?</p>

Ajinkya16
<p><code>Can kubernetes deployment manifest file have both -env and -envFrom keys? </code></p>
<p>Yes.</p>
<pre><code>...
envFrom:
- secretRef:
    name: &lt;name of your secret&gt;
env:
- name: &lt;variable name&gt;
  value: &lt;hardcoded value&gt;

- name: &lt;variable name&gt;
  valueFrom:
    secretKeyRef:
      name: &lt;name of your secret&gt;
      key: &lt;If I only want this and not all the keys in the secret&gt;
</code></pre>
