From 270756e93da0778762e19e033707a15ddac9ed9f Mon Sep 17 00:00:00 2001 From: Anshul Sirur Date: Fri, 17 Apr 2020 09:53:04 +0200 Subject: [PATCH] Bind mount /var/tmp for Podman When the CRI-O container storage backend is used, loading images using `podman load` creates temporary files in /var/tmp. As /var/tmp is mounted as tmpfs, these temporary files rapidly consume the available memory and cause processes on the minikube VM to be OOM-killed. Instead, bind mount /var/tmp like we do with /var/log, which will write temporary files to disk instead of memory. --- deploy/iso/minikube-iso/package/automount/minikube-automount | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/iso/minikube-iso/package/automount/minikube-automount b/deploy/iso/minikube-iso/package/automount/minikube-automount index 17fc8b0279..77e5fda1fe 100755 --- a/deploy/iso/minikube-iso/package/automount/minikube-automount +++ b/deploy/iso/minikube-iso/package/automount/minikube-automount @@ -109,6 +109,10 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then mkdir /var/log mount --bind /mnt/$PARTNAME/var/log /var/log + mkdir -p /mnt/$PARTNAME/var/tmp + mkdir /var/tmp + mount --bind /mnt/$PARTNAME/var/tmp /var/tmp + mkdir -p /mnt/$PARTNAME/var/lib/kubelet mkdir /var/lib/kubelet mount --bind /mnt/$PARTNAME/var/lib/kubelet /var/lib/kubelet