<p>I am pretty new to Kubernetes so I don't have much idea. Last day a pod went down and I was thinking if I would be able to recover the tmp folder.</p>
<p>So basically I want to know that when a pod in Kubernetes goes down, does it lose access to the &quot;/tmp&quot; folder ?</p>

Avik
<p>Unless you configure otherwise, this folder will be considered storage within the container, and the contents will be lost when the container terminates.</p>
<p>Similarly to how you can run a container in docker, write something to the filesystem within the container, then stop and remove the container, start a new one, and find the file you wrote within the container is no longer there.</p>
<p>If you want to keep the <code>/tmp</code> folder contents between restarts, you'll need to attach a <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes" rel="nofollow noreferrer">persistent volume</a> to it and mount it as <code>/tmp</code> within the container, but with the caveat that if you do that, you cannot use that same volume with other replicas in a deployment unless you use a read-write-many capable filesystem underneath, like NFS.</p>
