<p>What is the simplest way to configure parameter max_prepared_transactions=100 in docker kubernetes?</p>

<p>I am using image:</p>

<p><a href="https://hub.docker.com/_/postgres/" rel="nofollow noreferrer">https://hub.docker.com/_/postgres/</a></p>

<p>Which has postgresql.conf file at /var/lib/postgresql/data</p>

<p>In my kubernetes deployment, that directory is externally mounted so I can't copy postgresql.conf using Dockerfile so I need to specify that parameter as a ENV parameter in Kubernetes .yml file, or changing the location of postgresql.conf file to, for example, /etc/postgresql.conf (how can I do this as a ENV parameter too?)</p>

<p>Thanks</p>

<p>You can set this config as runtime flag when you start your docker container. Something like this:</p>

<pre><code>$ docker run -d postgres --max_prepared_transactions=100
</code></pre>
