An app writes session files under /var/cache inside the container and loses them every time the Pod restarts. Why?
Select an answer to reveal the explanation.
Short Explanation
The container’s writable layer is a hotel notepad—fine for tonight, gone at checkout. Restart the Pod and that /var/cache scratch vanishes unless you mount a volume. Persistence needs an explicit volume, not hope.
Full Explanation
Container filesystem writes that are not backed by a volume live in the container’s ephemeral writable layer and are lost when the container is recreated. Deployments and imagePullPolicy do not change that rule. Mount emptyDir, a PVC, or another volume type when data must survive restarts within the intended lifecycle.