<p>Is it possible for an InitContainer to change the environment variables of the application container when running inside the same Pod?</p>

<p>Note that I am looking for a detailed answer that describes the technical reasons why this is or isn't possible. Example: 'Current container technology supports environment variable isolation between containers and Pods cannot bypass that restriction by "grouping" containers in the same "environment variable space"'.</p>

<p>No, it is not possible to just change the variables like that. One of the possible workarounds is to use an <code>EmptyDir</code> volume shared between the <code>InitContainer</code> and the main container. You can store there a the variables using a file in <code>InitContainer</code> and load them in the main container using a some simple shell script.</p>
