<p>We aware of that we can define environment variables in pod/containers. i wanted to use the same environment variable inside the container at runtime. </p>

<p>ex: i am running a webapplication using python ,  inside that how to i get the values of environment values?</p>

<p>First go inside the pod or <code>exec</code> the <code>bash</code>(<code>kubeclt exec -it &lt;pod_name&gt; bash</code>) and run <code>printenv</code> to get some idea what are the environmental variables available. </p>

<p>From Python </p>

<pre><code>import os
os.environ['MYCUSTOMVAR']
</code></pre>
