kid
kid copied to clipboard
The path /var/lib/kubelet/ is not shared
Running OS X El Capitan && Docker for Mac 1.12.
Upon ./kid up
I always get
Docker for Mac detected
docker: Error response from daemon: Mounts denied:
The path /var/lib/kubelet/
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
..
Waiting for Kubernetes cluster to become available...
until I SIGINT.
But in the "File Sharing" tab in Docker for Mac preferences the directory /private
is already set and /var
in OS X is a symlink to /private/var
, so whatever kid
needs in there should be shared already.
$ ls -l /
...
lrwxr-xr-x@ 1 root wheel 11 Mar 12 10:38 var -> private/var
Adding the subdirectory kubelet
did not help. Adding the path /var/lib/kubelet
to the File Sharing preferences is not possible since it resolves to /private/var/lib/kubelet
(because of the symlink) and then overlaps with the /private
share:

What to do?
Seems this is a general Docker for OSX issue. Any pointers welcome though, after an hour of googling and reading I'm still at a loss.
I have similar problems.
I have changed the paths for the volume mounting for the kublet docker container in the kid script to find both the kublet and docker locations.
I get a bit further but it does not find the docker daemon.
- --volume=/var/lib/docker/:/var/lib/docker:rw \
- --volume=/var/lib/kubelet/:/var/lib/kubelet:rw,shared \
+ --volume="/Users/YOUR_USER/Library/Group Containers/group.com.docker/bin/docker":/var/lib/docker:rw \
+ --volume=/private/var/lib/kubelet:/var/lib/kubelet:rw,shared \
Changing the path in the kid script to
+ --volume=/private/var/lib/kubelet/:/var/lib/kubelet:rw,shared \
and creating that directory with permissions 777 makes the "is not shared" error go away.
But then I get
$ ./kid up
Docker for Mac detected
docker: Error response from daemon: mkdir /private: file exists.
Waiting for Kubernetes cluster to become available...
and that's it.
@onekilo79 do you have Docker for Mac installed (not the old Docker Toolbox)? If not, try it. Also what your tried above, mapping the docker binary to /var/lib/docker
in the Moby VM, cannot be right.
I tried both. I never got this project to start with anything.
I also never got the minikube with a running k8s app either.
I did get a minikube 0.7.1 session up and running using mac non-beta client 1.12.1 and using the dvm Docker version manager to downgrade docker client to 1.11.1. Do not use the docker-env settings from minikube.
Ah, running into this, too. Shoot.
Changed host path to /private/var/lib/kubelet
as suggested by @nem75 but getting the somewhat cryptic error:
docker: Error response from daemon: linux mounts: Path /private/var/lib/kubelet is mounted on /private but it is not a shared mount..
I am getting this issue as well, with current master (ie, post #15 as it's at 1.3.5 now)
I'd call this really a docker bug, fwiw, that it de-references symlinks, but :-/
+1 Having the same issue any luck with this?
same here +1
+1 to this issue. targeting /var/log
since the containers should also be compatible with gnu/linux distributions - but ofcourse, osx's /var
is just a symlink.
+1
I'm also experiencing this issue on macOS Sierra.
I have the exact same issue using /var/www
Did anyone find some solution to this ?
I've revert to using minikube due to this issue.
I fixed the issue by editing the ./docker-compose.yml
file.
I changed the /var/whatever:/var/whatever
to /private/var/whatever:/var/whatever
注释掉Mountflag就好了
+1
+1
+1
+1