<p>I have a Deployment that runs one container with a root user. It's perfectly clear that everything my application saves under <code>/data</code> will be ephemeral if I don't have any type of persistent volume and <code>volumeMounts</code> defined.</p>
<p>My question is what would be the purpose of specifying an <a href="https://kubernetes.io/docs/concepts/storage/volumes/#emptydir" rel="nofollow noreferrer">emptyDir</a> Volume and mounting it to <code>/data</code>? If I don't use <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#emptydirvolumesource-v1-core" rel="nofollow noreferrer">fancy features</a> for emptyDir like <code>medium</code> or <code>sizeLimit</code> isn't it the same as using no volumes at all?</p>

Ivan Aracki
<p>One of the main features of the emptyDir is that it can be mounted on multiple containers inside the same Pod.
If you don't use this feature I guess there is not much to gain from it. If I remember correctly emptyDirs are preserved when the container inside the pod are restarted but not when the pod is re-scheduled.</p>
