-
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
LXD vm-driver support for Linux users #946
Comments
I'm not too familiar with LXD, it would be an alternative to KVM? Is there an existing docker-machine driver for LXD? That would be a good first step in figuring out the feasability of this. |
No there isn't currently a docker-machine driver for LXD |
But you can run Docker inside an LXD container... Here is Stephane Graber (one of the LXD devs) web blog on running docker in lxd... https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ |
@bmullan I'm also running into the issue. @BrendanBall There's also currently another issue related to running Docker in LXD. See here https://github.com/lxc/lxd/issues/2825 |
@BrendanBall did you ever make any progress with this? |
@CarltonSemple No I haven't. For some reason I didn't get a notification for your message. I currently don't actively use kubernetes in any projects, I only play around with it when I get the time, which isn't very often. You'll see I referenced an issue on docker-machine where someone else has another use case for supporting LXD in docker-machine. |
Developing a docker-machine driver for LXD is something that seems at first sight weird and a bad idea (running one container system inside another container system). Although I agree and would very like to see the use-case of the current issue go forward, I'm afraid that it's probably one of the few use cases for such driver to make sense, and so I'm not optimistic that it will get developed anytime soon... Which brings me to the question: is such driver a requirement for going forward with minkube's lxd support? Can't the docker-machine generic drivers (that use simple ssh connections) somehow be leveraged? |
Closing as this is stale. |
Running Minikube inside a LXC container Background Problem Solution Procedure Create a fixed size ZFS dataset / LVM volume on the hypervisor side $ zfs create -V 50G zfsPool/dockerstorage #USING ZFS $ parted /dev/zvol/zfsPool/dockerstorage --script mklabel gpt #USING ZFS Format the virtual partition to xfs with the ftype flag set to 1 $ mkfs.xfs -n ftype=1 /dev/zvol/zfsPool/dockerstorage-part1 #FOR ZFS $ lxc config device add minikube dockerstorage disk path=/var/lib/docker source=/dev/zvol/zfsPool/dockerstorage-part1 #FOR ZFS Use the following LXC configuration profile in the LXC container to allow it running Minikube config: minikube start --vm-driver=none --extra-config kubeadm.ignore-preflight-errors=SystemVerification |
This is for anyone running into a somewhat related issue ...
Re-attempt the command |
FEATURE REQUEST
It seems that only full virtual machines are currently supported for deploying minikube.
As a Linux user (and Kubernetes being native to Linux) this feels unnecessary to use a full VM when I could just use an Lxd container if I don't want to run it on my host. Lxd would provide the same reproducible environment as a VM. I didn't find any issues relating to Lxd so I would like to find out if there is a reason for that? Would anyone else be interested in this feature?
EDIT: I've so far tried to use kube-deploy inside an lxd container running ubuntu 16.04.
It seems to run into a problem docker pulling some of the images. The same images that fail in lxd successfully pull on the host running lxd. It seems to be some filesystem problem.
docker images pulled successfully:
docker images failed on pulling:
(extracting last layer: "failed to register layer: ApplyLayer exit status 1 stdout: stderr: lchown /usr/local/bin/etcd: invalid argument")
(extracting last layer: "failed to register layer: ApplyLayer exit status 1 stdout: stderr: lchown /usr: invalid argument")
This fails regardless whether trying to pull from the bootstrap docker or normal docker instance inside lxd.
The text was updated successfully, but these errors were encountered: