<p>I've an applicaion running inside pod which is created by deployment specification in k8s. As I've NFS clients in all nodes, I can mount volume from host to pod. Here is the mount-vol portion of yml file</p>

<pre><code>spec:
  containers:
    volumeMounts:
    - mountPath: /app/config
      name: config-volume
    - mountPath: /var/log
      name: logs

  volumes:
  - name: config-volume
    hostPath:
      path: /nfs/config
  - name: logs
    hostPath:
      path: /nfs/logs/containerlogs
</code></pre>

<p><strong>config-volume</strong>: it mounts the config files from host to pod container.</p>

<p><strong>logs</strong>: it is <strong>not working</strong>. I want to mount the log folder from pod container to host folder. </p>

Ratul
<p>I don't think you mount containers to host. It is always host to pod.  Make sure that the path /nfs/logs/containerLogs exist in the host so that your pod can write to it.</p>
