<p>We have to set https_proxy &amp; http_proxy for internet access from our cluster instances.</p>

<p>https_proxy &amp; http_proxy environment variables should be exported to all pods so that application can access external sites.</p>

<p>We are using helm charts so is there common place we can set these environment variables so all pods can access internet.</p>

erdarun
<p>You should be using PodPreset object to pass common environment variables and other params to all the matching pods.</p>
<h1>Add label <code>setproxy:true</code> to all pods</h1>
<p>The below <code>PodPreset</code> object would inject <code>HTTPS_PROXY</code> and <code>HTTP_PROXY</code> environment variable to all pods that match label <code>setproxy:true</code></p>
<pre><code>apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
  name: inject-proxy-var
spec:
  selector:
    matchLabels:
      setproxy: true
  env:
    - name: HTTPS_PROXY
      value: &quot;https_proxy&quot;
    - name: HTTP_PROXY
      value: &quot;http_proxy&quot;
</code></pre>
<p>Follow the link for more help --&gt; <a href="https://kubernetes.io/docs/tasks/inject-data-application/podpreset/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/inject-data-application/podpreset/</a></p>
<h1>You should enable Pod Preset in your cluster. follow the below link</h1>
<p><a href="https://kubernetes.io/docs/concepts/workloads/pods/podpreset/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/pods/podpreset/</a></p>
