If you are trying to mount a host path as a persistent volume in minikube, and you are running minikube on MacOSX, you are likely to be faced with permission denied issues when using the persistent volume.

Here is the steps to overcome this:-

echo "/Users -network 192.168.99.0 -mask 255.255.255.0 -alldirs -maproot=root:wheel" | sudo tee -a /etc/exports
sudo nfsd restart
minikube start
minikube ssh -- sudo umount /Users
minikube ssh -- sudo /usr/local/etc/init.d/nfs-client start
minikube ssh -- sudo mount 192.168.99.1:/Users /Users -o rw,async,noatime,rsize=32768,wsize=32768,proto=tcp

Source: Minikube Github Issue

 

 

Advertisements