I have a use case where I need a Docker container under the tunnels to access hostPath. I use minikube and the container has access to the folder in the minikube VirtualBox virtual machine. But I can’t figure out how to access the folder on the host itself.
I do these commands on the host to create / opt / foo for sharing in a virtual machine:
$ sudo touch /opt/foo/FOO
$ ls /opt/foo
FOO
$ minikube mount -v 5 /opt/foo:/opt/foo
Mounting /opt/foo into /opt/foo on the minikubeVM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting
In another window, I look into a mini-mini-virtual machine
$ minikube ssh -- sudo ls -la /opt/foo
total 0
drwxrwxr-x 2 root root 0 Jun 1 14:44 .
drwxr-xr-x 5 root root 0 Jun 1 14:44 ..
Is there another step necessary to access the files in this directory?
FYI - the used case is a container process that creates files that the host process processes. So I do not want to use nfs or PersistentVolumes. Host - Centos7. Minikube version: v0.19.0.