<p>My app consists of two containers: the app itself and a database. I'm planning to wrap the app into a chart, thus paving a way for easy reproducible deployment.</p>

<p>Apart from setting/reading environment envs (which helm+kubernetes seems to handle really well), part of app's configuration is:</p>

<blockquote>
  <p>making sure the database is pre-filled with special auxiliary data (e.g. admin user exists, some user role names required to create new users are there, etc.).</p>
</blockquote>

<p>I like the idea of having readable yaml files hold the entire configuration in a human readable format. However at a glance it doesn't seem that <code>helm</code> in any way would help with <em>this</em> (DB records) kind of configuration.</p>

<p>That being said, <strong>what is the best place</strong> to put code/configuration ensuring that DB contains certain auxiliary records? A config yaml file? An container init script, written in bash?</p>

<p>You are right, Kubernetes or Helm cannot help with preparing your pre-filled database records/schema.</p>

<p>You should probably have your application initialize those pre-filled data. If you don't want to put this logic into your application, you can ship an initialization script and configure an <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="nofollow noreferrer">init container</a> with Kubernetes.</p>

<p>Kubernetes makes sure every time your application container is restarted, the init container runs first. In the init container, you can execute a bash/python/... script that makes sure the records you want are there.</p>
