<p>This is the directory on the host:</p>
<pre><code>├── deploy.yaml
└── foobar
    └── foo.sh
</code></pre>
<p>and the content of deploy.yaml file:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: foobar-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: foobar-app
  template:
    metadata:
      labels:
        app: foobar-app
    spec:
      containers:
        - name: foobar-container
          image: nginx
          #command: [&quot;sh&quot;, &quot;-c&quot;, &quot;&quot;/foobar/foo.sh&quot;&quot;] 
          volumeMounts:
            - name: foobar-volume
              mountPath: /foobar
      volumes:
        - name: foobar-volume
          hostPath:
            path: /home/n/projects/minikube-test/foobar
</code></pre>
<p>When I exec into the container, I see foobar directory, but not foo.sh.</p>
<pre><code>k exec -it foobar-deployment-8459bf6d8f-mlprq -- ls -lart foobar
total 8
drwxr-xr-x 2 root root 4096 Jun 17 02:37 .
drwxr-xr-x 1 root root 4096 Jun 17 03:14 ..
</code></pre>
<p>What am I missing? Thank you</p>

nickm
<p>This worked:
First, mounted host directory to a location on the VM:</p>
<pre><code>minikube mount /home/n/projects/minikube-test/foobar:/mnt1/foobar
</code></pre>
<p>Next, modified deploy.yaml file:</p>
<pre><code>          volumeMounts:
            - name: foobar-volume
              mountPath: /foobar
      volumes:
        - name: foobar-volume
          hostPath:
            path: /mnt1/foobar
</code></pre>
