title: Kubernetes Volumes - Dynamic path
body: <p>I want my applications to write log files at a host location, so I'm mounting a <code>hostPath</code> volume. But all applications try to write logs using the same file name.</p>
  
  <p>I'd like to separate the files into folders named after the Pod names, but I see nowhere in the documentation how to implement it:</p>
  
  <pre><code>  volumes:
    - name: logs-volume
      hostPath:
        path: /var/logs/apps/${POD_NAME}
        type: DirectoryOrCreate
  </code></pre>
  
  <p>In the (not working) example above, apps should write files to the POD_NAME folder.</p>
  
  <p>Is it possible?</p>