Skip to content

Commit

Permalink
Bind mount /var/tmp for Podman
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vixus0 committed Apr 17, 2020
1 parent 725bfa0 commit 270756e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deploy/iso/minikube-iso/package/automount/minikube-automount
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 270756e

Please sign in to comment.