<p>Currently, I have multiple separate pods, each running the same image, but with a different entrypoint. As a result, the pods require the same set of environment variables. This is an example of the helm template of how I am passing the env variable to a pod, using the normal k8s env attribute (however, the actual number of variables is much more):</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: envar-demo
  labels:
    purpose: demonstrate-envars
spec:
  containers:
  - name: envar-demo-container
    image: gcr.io/google-samples/node-hello:1.0
    env:
    - name: DEMO_GREETING
      value: {{ get-value-from-helm-values }}
    - name: DEMO_FAREWELL
      value: {{ get-value-from-helm-values }}
</code></pre>
<p>Since each of the pods need the same set of env variables, I am currently copy pasting the entire long list multiple times for every pod container definition where it is required, making it all quite messy. Is there any better way to share these variables?</p>

arthhhhh
<p>Proper procedure of accomishing this would be through the use of a ConfigMap. Create a configmap of all the variables and then load then as environment variables using <code>envfrom</code></p>
<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">how to doc</a></p>
