I am trying to use kubernetes for local deployment using minikube, I want to mount a share a directory between host machine and pods. For this, I am trying to mount directory to minikube. But I already had minikube running on which few deployments were running. I deleted them. But every time I restart minikube with mount I get following error
$ minikube start --mount-string="/var/log:/log" --mount
* minikube v1.14.2 on Ubuntu 18.04
* Using the docker driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Restarting existing docker container for "minikube" ...
X Exiting due to GUEST_MOUNT_CONFLICT: Sorry, docker does not allow mounts to be changed after container creation (previous mount: '', new mount: '/var/log:/log)'
Output for kubectl get all is
kubectl get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2s
What am I doing wrong here. I need to mount /var/log:/log in my pods just like docker