<p>I've created the manifest file, that looks as follows: </p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: kuard
spec:
  volumes:
    - name: "kuard-data"
      hostPath:
        path: "/home/developer/kubernetes/exercises"
  containers:
    - image: gcr.io/kuar-demo/kuard-amd64:1
      name: kuard
      volumeMounts:
        - mountPath: "/data"
          name: "kuard-data"
      ports:
        - containerPort: 8080
          name: http
          protocol: TCP
</code></pre>

<p>As you can see, the hostpath is:</p>

<pre><code>path: "/home/developer/kubernetes/exercises"
</code></pre>

<p>and the <code>mountPath</code> is: </p>

<pre><code>mountPath: "/data"
</code></pre>

<p>I've created a <code>hello.txt</code> file in the folder <code>/home/developer/kubernetes/exercises</code> and when I enter into the pod via <code>kubectl exec -it kuard ash</code> I can not find the file <code>hello.txt</code>.</p>

<p><a href="https://i.stack.imgur.com/EfmuM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EfmuM.png" alt="enter image description here"></a></p>

<p>Where is the file?</p>

softshipper
<p>kind is using Docker containers to <code>simulate</code> Kubernetes nodes. So when you are creating files on your host (your ubuntu machine) the containers will not automatically have access to them. 
(This gets even more complicated when using macos or windows and docker is running in a separate virtual machine...)</p>

<p>I assume that there are some shared folders visible inside the kind-docker-nodes, but I could not find it documented.</p>

<p>You can verify the filesystem content of the docker node from inside the container using <code>docker exec -it kind-control-plane /bin/sh</code> and then work with the usual tools.</p>

<p>If you need to make content from your development machine available you might want to have a look at ksync: <a href="https://github.com/vapor-ware/ksync" rel="nofollow noreferrer">https://github.com/vapor-ware/ksync</a></p>
