<p>I need to map a directory in my local machine with a directory exist in a docker container which runs inside my kubernetes cluster . Could someone please help me on this?</p>

<pre><code>host dir : /opt/dev/project1
kube image location: /var/logs
</code></pre>

ShanWave007
<p>You can mount your host directory into kubernetes pod using <a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">hostpath</a></p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /var/logs
      name: test-volume
  volumes:
  - name: test-volume
    hostPath:
      # directory location on host
      path: /opt/dev/project1
      # this field is optional
      type: Directory
</code></pre>
