-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow minikube to run in a non-default docker host #9463
Comments
in the design there should be mindful of minikube docker-env
something like this
|
/assign |
Why is this something that we want to support ? Why not just use our minikube VM, instead of the boot2docker VM ?
At the very least, one would have to use --virtualbox-cpu-count=2 --virtualbox-memory=2048 to double the defaults...
Note that Docker Machine is unmaintained and unsupported, and we have already forked libmachine for minikube |
This (using Docker Machine) has a lot of the same problems as using Podman Remote: #8003 Like for instance those ports we publish, they are not from localhost but from the boot2docker VM So the Same problem with any bind mounted volumes ( |
Seems to be doable (in theory), otherwise. $ docker-machine create --driver=virtualbox --virtualbox-cpu-count=2 --virtualbox-memory=2048 default
Running pre-create checks...
Creating machine...
[...]
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default At least when running minikube locally on it: $ docker-machine ssh
( '>')
/) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\) www.tinycorelinux.net
docker@default:~$ minikube start
😄 minikube v1.14.0 on Boot2docker 19.03.12 (vbox/amd64)
✨ Automatically selected the docker driver
🧯 The requested memory allocation of 1993MiB does not leave room for system overhead (total system memory: 1993MiB). You may face stability issues.
💡 Suggestion: Start minikube with less memory allocated: 'minikube start --memory=1993mb'
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
🔥 Creating docker container (CPUs=2, Memory=1993MB) ...
🐳 Preparing Kubernetes v1.19.2 on Docker 19.03.8 ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: storage-provisioner, default-storageclass
💡 kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
🏄 Done! kubectl is now configured to use "minikube" by default
docker@default:~$ docker@default:~$ df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 1.8G 328.4M 1.4G 18% /
/dev/sda1 17.8G 2.5G 14.4G 15% /mnt/sda1
docker@default:~$ free -m
total used free shared buff/cache available
Mem: 1993 649 30 366 1313 1011
Swap: 1417 6 1410 Only listens on 127.0.0.1 though: $ eval $(docker-machine env default)
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ecf1ba19ee4 gcr.io/k8s-minikube/kicbase:v0.0.13 "/usr/local/bin/entr…" 10 seconds ago Up 10 seconds 127.0.0.1:32771->22/tcp, 127.0.0.1:32770->2376/tcp, 127.0.0.1:32769->5000/tcp, 127.0.0.1:32768->8443/tcp minikube So not accessible from the host ? |
To document this for others with the same question:
The end goal here is to have something similar to Docker Desktop, with a long-running VM for running the containers on... So the VM would already be running when This is similar to the "generic" driver, but with the added isolation of creating a container vs. running directly (bare metal machine) i.e. generic is similar to none (but running remote), while this docker host would be similar to docker driver (but running remote) none: run docker (unix/fd): run container (runc) directly on localhost Never mind the interim layers between docker and runc, such as dockerd and containerd, those are only messengers. The "podman" driver is very similar, except it only runs the daemon for remote connections - just the "conmon" for local. |
We could use the same Vagrant setup for testing this remote driver, as for testing the "generic" one ? Just have to add the provisioner, which basically just called Nowadays it is in the packages repos, so can just do "apt install docker.io" or "yum install podman" Examples here: https://boot2podman.github.io/2020/07/22/machine-replacement.html You can still get it from the vendor of course, if you want a newer version than what's in the distribution... There's no script for podman, just a readme: https://podman.io/getting-started/installation#linux-distributions |
This is will create a docker host inside of vbox VM, which currently causes minikube to fail, if there is no docker daemon running directly on a user's machine.
The text was updated successfully, but these errors were encountered: