<p>I have an environment variable like as follows that works with docker-compose.yaml in relation to a springboot container:</p>

<pre><code>    - name: pool.config[0].Number
      value: "2"
</code></pre>

<p>This works completely fine in docker-compose.yaml but not in yaml - it keeps giving error:</p>

<pre><code>    a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or'.', and must not start with a digit (e.g. 'my.env-name',  or 'MY_ENV.NAME',  or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*')
</code></pre>

<p>In docker-compose it's fine with the square brackets in the key name, but in kubernetes deployment spec it's not permitting. How can I work through this?</p>

<p>see <a href="https://github.com/spring-projects/spring-boot/issues/5315" rel="nofollow noreferrer">here</a> and <a href="https://github.com/spring-projects/spring-boot/wiki/Relaxed-Binding-2.0#lists-1" rel="nofollow noreferrer">here</a></p>

<p>You should be able to use following binding for your case: <code>POOL_CONFIG_0__Number</code></p>
