<p>We want to deploy <em>laravel</em> project in k8s. For database we have a <code>data.sql</code> file. When we create docker image for this project, <code>data.sql</code> was easy to pass in volume like:</p>

<p>volumes:</p>

<pre><code>  - ./data.sql:/docker-entrypoint-initdb.d/data.sql
</code></pre>

<p>but in k8s i'm not able to make connection between the database and .sql file 
So do let me know, how to pass .sql file in kubernetes volume?</p>

<p>in .sql file we have a large amount of data, when we use configmap it gives an error</p>

<pre><code>"command terminated with exit code 137"
</code></pre>

Saya Kasta
<p>Considering the limit of 1MB for configmaps I would initiate a sidecar that pulls this sql file in an empty dir to the main container for the DB. Naturally the git method is deprecated but this should help:</p>

<ul>
<li><a href="https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo</a></li>
<li><a href="https://github.com/kubernetes/git-sync/blob/master/docs/ssh.md" rel="nofollow noreferrer">https://github.com/kubernetes/git-sync/blob/master/docs/ssh.md</a></li>
</ul>
