Enables and configures NFS server daemon on macOS and defines remote mount points for the Minikube VM.
- macOS
- minikube v0.18.0
$ curl -LOSs https://github.com/mstrzele/minikube-nfs/releases/download/v0.1.0/minikube-nfs
$ chmod +x minikube-nfs
$ sudo mv minikube-nfs /usr/local/bin
$ minikube start
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
Moving files into cluster...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.
$ sudo minikube-nfs -n"-alldirs -mapall=$(id -u):$(id -g)"
Password:
INFO[0000] machine presence ... clusterState=Running
INFO[0001] machine running ... clusterState=Running
INFO[0001] Lookup mandatory properties ... clusterIP=192.168.99.100
INFO[0001] Configure NFS ... machineIP=192.168.99.100 nfsConfig="-alldirs -mapall=501:20" sharedFolders=[/Users] useIPRange=false
$ cat <<EOF | kubectl create -f -
apiVersion: v1
kind: PersistentVolume
metadata:
name: users
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
nfs:
path: /Users
server: 192.168.99.1
EOF
persistentvolume "users" created
NFS seems to be 10x faster than VirtualBox filesystem.
Tested using IOzone 3.434.
Logs are available in iozone-vboxfs.log
and iozone-nfs.log
files.
Configuraiton can be seen in iozone-vboxfs-job.yaml
and iozone-nfs-job.yaml
files.
- Start Minikube.
- Apply
iozone-vboxfs-job.yaml
. - See the logs from the pod.
- Configure NFS using
minikube-nfs
. - Apply
iozone-nfs-job.yaml
. - See the logs from the pod.