<p>I have a single node Kubernetes cluster. I want the pod I make to have access to /mnt/galahad on my local computer (which is the host for the cluster).</p>

<p>Here is my Kubernetes config yaml:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: galahad-test-distributor
  namespace: galahad-test
spec:
  volumes:
     - name: place-for-stuff
       hostPath:
        path: /mnt/galahad
  containers:
   - name: galahad-test-distributor
     image: vergilkilla/distributor:v9
     volumeMounts:
        - name: place-for-stuff
          mountPath: /mnt
    resources:
      limits:
        memory: "200Mi"
      requests:
        memory: "100Mi"
</code></pre>

<p>I start my pod like such:</p>

<pre><code>kubectl apply -f ./create-distributor.yaml -n galahad-test
</code></pre>

<p>I get a terminal into my newly-made pod:</p>

<pre><code>kubectl exec -it galahad-test-distributor -n galahad-test -- /bin/bash
</code></pre>

<p>I go to /mnt in my pod and it doesn't have anything from /mnt/galahad. I make a new file in the host /mnt/galahad folder - doesn't reflect in the pod. How do I achieve this functionality to have the host path files/etc. reflect in the pod? Is this possible in the somewhat straightforward way I am trying here (defining it per-pod definition without creating separate PersistentVolumes and PersistentVolumeRequests)?</p>

PinkElephantsOnParade
<p>Your yaml file looks good.</p>

<p>Using this configuration:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: galahad-test-distributor
  namespace: galahad-test
spec:
  volumes:
     - name: place-for-stuff
       hostPath:
        path: /mnt/galahad
  containers:
   - name: galahad-test-distributor
     image: busybox
     args: [/bin/sh, -c,
            'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done']
     volumeMounts:
        - name: place-for-stuff
          mountPath: /mnt
     resources:
       limits:
         memory: "200Mi"
       requests:
         memory: "100Mi"
</code></pre>

<p>I ran this and everything worked as expected:</p>

<pre><code>&gt;&gt;&gt; kubectl apply -f create-distributor.yaml # side node: you don't need 
                                             # to specify the namespace here
                                             # since it's inside the yaml file
pod/galahad-test-distributor created

&gt;&gt;&gt; touch /mnt/galahad/file
&gt;&gt;&gt; kubectl -n galahad-test exec galahad-test-distributor ls /mnt
file
</code></pre>

<p>Are you sure you are adding your files in the right place? For instance, if you are running your cluster inside a VM (e.g. minikube), make sure you are adding the files inside the VM, not on the machine hosting the VM.</p>
