subPathExpr is good for local dev
How to set the value of mountPath in an env variable in kubernetes?
I used a configMap to store the mount path value, but when i call in my pod it doesn't work it seems that the mountPath property can not be assigned to an env variable. here is my code : apiVersi...
https://stackoverflow.com/questions/61195918/how-to-set-the-value-of-mountpath-in-an-env-variable-in-kubernetes
Volumes
On-disk files in a container are ephemeral, which presents some problems for non-trivial applications when running in containers. One problem is the loss of files when a container crashes. The kubelet restarts the container but with a clean state. A second problem occurs when sharing files between containers running together in a Pod.
https://kubernetes.io/docs/concepts/storage/volumes/#hostpath


Seonglae Cho