<p>I'm try to get my local development environment converted from <code>docker-compose</code> to a flavour of lightweight Kubernetes, since our production environments are all Kubernetes (like). With the help of <a href="https://kompose.io" rel="nofollow noreferrer">Kompose</a> I could convert my settings. The part however I struggle with is the conversion of Docker volumes to a local developer machine Volume and Volume claim. Most examples I found cover drivers for S3 or NFS, which isn't what my development laptop offers.</p>
<p>So when I have in my <code>docker-compose.yml</code> a setting like this, what's the local development equivalent in k8s?</p>
<pre class="lang-yaml prettyprint-override"><code>version: &quot;3.6&quot;
services:
  my_test:
    image: &quot;myregistry.com/my_test&quot;
    container_name: &quot;demo&quot;
    hostname: &quot;demo.acme.local&quot;
    stop_grace_period: 120s
    cap_add:
      - SYS_PTRACE
    ports:
      - 80:80
    volumes:
      - my_vol:/local/my_app
volumes:
  my_vol:
    name: &quot;/local/containers/my_app&quot;
    external: false
</code></pre>
<p>I'm &quot;only&quot; looking for the volume part. The rest seems clear.<br />
Help is appreciated</p>

stwissel
<p>Yes you can use the <strong>host path</strong> or you can use the <strong>emptydir</strong> that's on you</p>
<p>Probably <strong>hostpath</strong> would be a better option.</p>
<p>If you are planning to use the <strong>minikube</strong> you can also check out the <strong>PV</strong> and <strong>PVC</strong> option which is mostly for the <strong>persistence</strong> storage in Kubernetes.</p>
<p><strong>Hostpath</strong> : <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath-configuration-example" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#hostpath-configuration-example</a></p>
<p><strong>emptydir</strong> : <a href="https://kubernetes.io/docs/concepts/storage/volumes/#emptydir" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/#emptydir</a></p>
