<p>I've dockerized a python project that requires the use of several CSVs (~2gb). In order to keep image size down I didn't include the CSVs in the build, instead opting to give the running container the data from a directory outside the container through a volume. Locally, when running through docker, I can just do</p>

<pre><code>docker run -v ~/local/path/:/container/path my-image:latest
</code></pre>

<p>This works, but I'm not sure how to go about doing this in Kubernetes. I've been reading the documentation and am confused by the number of volume types, where the actual CSVs should be stored, etc.</p>

<p>Based on the information about the project that I've provided, is there an obvious solution?</p>

Mike S
<p>If you'd like to replicate that exact behavior from Docker the most common way to do it is to use <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">hostPath</a>. Something like this:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: my-image:latest
    name: my-container
    volumeMounts:
    - mountPath: /container/path
      name: test-volume
  volumes:
  - name: test-volume
    hostPath:
      path: /usr/local/path
      type: Directory
</code></pre>
