<p>I have application.properties with a list like so:</p>

<pre><code>api.users[0].name=dsaass@fakeacc.com
api.users[0].password=123QWEasd
api.users[1].name=dsadsasa@fakeacc.com
api.users[1].password=123qweASD
</code></pre>

<p>Now I need a Kubernetes env var for production/dev/demo etc. My other variables are declared like this:</p>

<pre><code>ftp.port=${FTP_PORT:22}
</code></pre>

<p>But how do I do it with a list?</p>

<p>Of course having users like this is not good practice and is temporary, just a proof of concept app.</p>

Rafał Sz
<p>Use configMap and secrets (--from-file ) and mount it to volume to be read or read it as an environment variable.</p>

<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/</a></p>
