<p>I was reading the documentation on Docker hub and came across the:</p>

<blockquote>
  <p>Configuration
  This image ships with the default <code>php.ini-development</code> and <code>php.ini-production</code> configuration files.
  It is strongly recommended to use the production config for images used in production environments!
  I followed the steps to use them by adding the following in my <code>Dockerfile.dev</code>:</p>
</blockquote>

<pre><code>RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
</code></pre>

<p>Or</p>

<pre><code>RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
</code></pre>

<p>Now when I start my cluster, all of the environmental variables it uses in the <code>index.php</code> say <code>Undefined Index</code> and the program no longer works. 
The fix is to comment out <code>RUN mv...</code> and then everything works again.</p>

<p>Why would it be breaking the Kubernetes environmental variables and how can I get them to work in conjunction?</p>

cjones
<p>Seems like switch from fetching environmental variables with <code>$_ENV['&lt;varname&gt;']</code> to <code>getenv('&lt;varname&gt;')</code> fixed the issue.</p>
