I want my applications to write log files at a host location, so I'm mounting a hostPath
volume. But all applications try to write logs using the same file name.
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:
volumes:
- name: logs-volume
hostPath:
path: /var/logs/apps/${POD_NAME}
type: DirectoryOrCreate
In the (not working) example above, apps should write files to the POD_NAME folder.
Is it possible?