-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Provide a way to create a multi-minions cluster on local VMs faster than with vagrant. #4498
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
d93766b
to
05a0e57
Compare
CLAs look good, thanks! |
/cc @brendandburns @thockin to find an appropriate reviewer |
Consider adding a line-item to On Tue, Feb 17, 2015 at 1:46 PM, Nikhil Jindal notifications@github.com
|
libvirt-coreos is a cluster provider for kubernetes that starts local VMs and runs kubernetes on it. Its goal is to provide a multi-machines environment to develop and test kubernetes. The purpose is mostly the same as the vagrant provider but with a big focus on efficiency. The vagrant cluster takes a long time to boot and consumes a huge amount of disk space. libvirt-coreos aims at being cheaper. As a consequence, libvirt-coreos allows to start bigger clusters with more minions than vagrant.
05a0e57
to
ce7a993
Compare
@erictune : Thanks for the tip. docs/getting-started-guides/README.md updated. |
Thanks, that part looks good. On Thu, Feb 19, 2015 at 3:49 AM, Lénaïc Huard notifications@github.com
|
LGTM. Merging. |
Provide a way to create a multi-minions cluster on local VMs faster than with vagrant.
Thanks for the PR! |
libvirt-coreos
libvirt-coreos is a cluster provider for kubernetes that starts local VMs and runs kubernetes on it.
Its goal is to provide a multi-machines environment to develop and test kubernetes.
The purpose is mostly the same as the vagrant provider but with a big focus on efficiency. Indeed, the vagrant cluster takes a long time to boot and consumes a huge amount of disk space.
The following array summarizes the differences between the vagrant and the libvirt-coreos kubernetes provider for a cluster with 1 master and 3 minions:
The first time the cluster (either vagrant or libvirt-coreos) is started, a base image (named “box” in vagrant language) for the VMs is downloaded. This image don’t need to be downloaded again for the subsequent boot.
The above figures were measured for the second or following boot. The time doesn’t take into account the download of the base image.
¹ The time to boot is the elapsed time measured by
time cluster/kube-up.sh
.² The disk space is measured with
df /home
before and aftercluster/kube-up.sh
³ The memory usage is measured with
free
before and aftercluster/kube-up.sh
As the libvirt-coreos cluster provider is cheaper than the vagrant one, it allows to start bigger clusters.
How to it works
It uses libvirt and qemu-kvm as hypervisor (in order to benefit from disk copy-on-write and linux Kernel Samepage Merging feature).
As OS, it uses CoreOS because it has the advantages of:
Reduced disk space
Vagrant copies the base image to create the disk for VMs whereas libvirt-coreos uses the Copy-on-Write feature of QEMU to create cheap VM drive.
Vagrant installs stuff inside each VM whereas in libvirt-coreos, all the VMs mount a drive from the host which contains the kubernetes binaries.
All in all, vagrant creates a 2.4 Gib file per VM whereas libvirt-coreos creates a 120 Mib file per VM.
Reduced memory footprint
libvirt-coreos uses qemu-kvm as hypervisor. qemu-kvm can use KSM to deduplicate memory pages.
Reduced boot time
Vagrant needs to:
libvirt-coreos uses cloud-config to let the VM provision themselves as soon as possible. libvirt-coreos’s kube-up starts all the VM and let them being provisioned in parallel.