Kubernetes Blog

Image Filesystem: Configuring Kubernetes to store containers on a separate filesystem

Kubernetes clusters can experience disk space shortages due to the container runtime writing to /var, which can be addressed by configuring the container runtime to store content separately. Kubernetes has persistent data (kubelet storage) and ephemeral data (container runtime storage). The container runtime stores both read-only and writable layers, known as imagefs in Kubernetes. CRI-O uses a storage configuration file to control storage locations, while containerd uses a TOML configuration file. Kubernetes detects if the container filesystem is separate from the node filesystem and monitors both for disk pressure. Users can configure eviction thresholds and grace periods to manage disk space usage. Common misconfigurations include mounting a new filesystem to the container storage directory or not setting all eviction signals. KEP-4191 aims to address limitations in ephemeral storage reporting and provide more container runtime configuration options. To get involved, join the Kubernetes Node Special-Interest-Group or provide feedback on the #sig-node Slack channel.
favicon
kubernetes.io
kubernetes.io