node_modules, databases, package caches. It is ext4 on the machine running
the pod, so file locks, hard links, and fsync behave as they do on any Linux
host. A volume fits files shared between workloads.
Declare a disk
size takes the units memory does, from 1Gi to 1Ti. Deploying a larger
size restarts the pod with the disk grown to it. A deploy with a smaller size
fails, because a disk never shrinks.
mount_path defaults to /, which makes the disk hold the container’s whole
writable filesystem: packages installed with apt-get, files in /root, and
anything else written outside a volume. The image still comes from the
deployment, so a redeploy with a new image keeps what was written on top of
it. Disk("cache", size="20Gi", mount_path="/cache") mounts at one directory
instead.
