Set pod writable layer size


I want to increase the default size of a pod’s writable layer in order to store a large database dump (~15-20G) before exporting it to an S3 bucket, and then deleting it on the pod.

I use docker with the devicemapper storage driver, and dm.basesize=10G in /etc/docker/daemon.json, so the writable layer is 10G by default. I don’t want to change dm.basesize, because I don’t want to increase the space available for other pods.

I don’t think an emptyDir would be appropriate for this use-case, because it would take up space in the filesystem holding the kubelet root dir (if medium is not memory), and this filesystem is only 10G in my case.

Is there a way to do this, or do I need to use a persistent volume even if I don’t need to persist the data and it will be empty most of the time?

Cluster information:

Kubernetes version: 1.13
Cloud being used: bare-metal
Installation method:
Host OS: Centos 7
CRI and version: docker 20.10.7