<p>I have a container image that is loading multiple large files on startup. When restarting the container, all files have to be loaded again.</p>
<p>What I want to do now is to start six instances which only load one file each, given an environment variable. Now my question is how to configure this. What I could do is create a new deployment+service for each file, but that seems incorrect because 99% of the content is the same, only the environment variable is different. Another option would be to have one pod with multiple containers and one gateway-like containers. But then when the pod is restarting, all files are loaded again.</p>
<p>What's the best strategy to do this?</p>

<p>Ideally, you should have to keep it like <strong>deployment+service</strong> and make 5-6 different secret or configmap as per need storing the environment variables files your application require.</p>
<p>Inject this <code>secret</code> or <code>configmap</code> one by one to each different deployment.</p>
<blockquote>
<p>Another option would be to have one pod with multiple containers and
one gateway-like containers.</p>
</blockquote>
<p>that's didn't look like scalable approach, if you are running the 5- container inside single pod and one gateway container also.</p>
