Skip to content

L3n41c/kubernetes-coreos-libvirt

Repository files navigation

kubernetes CoreOS libvirt

This project aims at automatizing the setup of a kubernetes cluster on top of a CoreOS cluster running on virtual machines provisioned via libvirt/KVM/QEMU

Usage

Download the materials

This has to be done only once. This has to be done as root as the downloaded materials need to be put in the libvirt images directory which is usually not world-writable.

su
./prepare_cluster
exit # from the root shell

This script will:

  • Enable KSM
  • Download the latest QEMU CoreOS image and put it in the directory corresponding to the default libvirt pool storage (usually /var/lib/libvirt/images/)
  • Download the latest kubernetes binaries and put them in the directory corresponding to the default libvirt pool storage (usually /var/lib/libvirt/images/)

Relaunching this script will check if the materials have been updated and download them again only if a new version is available.

Start a cluster with 5 VMs.

./boot_cluster

This script instantiates, through libvirt:

If boot_cluster fails, try to do a destroy_cluster in order to clean the libvirt objects.

Play with the kubernetes cluster

The master is reachable at 192.168.10.1. The VMs have automatically been fed with your ssh public keys

ssh core@192.168.10.1
/opt/kubernetes/bin/kubecfg list minions

Stop the cluster

./destroy_cluster

About

Running Kubernetes on a CoreOS cluster provisionned by libvirt/KVM/QEMU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages