Prepare a demo of Kubernetes with Nuage into KVM with cloud images and cloud_init
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Prepare your #Kubernetes Cluster with #Ansible and #cloud_init

A bit tired using bash scripts. I’ve done this small playbook based on the post: “Resize and manage cloud-init on kvm with centos cloud images”. to build up your k8s master/minions over KVM using a Cloud QCOW2 image. I’ve used cloud_init to configure those cloud images from a temporary cdrom iso.

Before to start, and important note

Note: if you are looking to install kubernetes after get those server using this repo. You can try This project is building a K8s cluster v1.5 thru a playbook.


Check out you have enough memory and cpu to share among the instances. Check out your NS record are working out for the server you will create Download the latest centos cloud image version:

curl > /tmp/centos7.qcow2

Install libvirt, libguestfs-tools and genisoimage. I’ve added a task to check those packages out anyway

Create one or two bridges (management and data networks) at your hypervisors

Quick Start

Just execute:

ansible-playbook build.yml
ansible-playbook -i hosts cluster-install.yml


Check and use build.yml to create your inventory and vars files (host and group). Inside build.yml you will define IPs, netmasks, gateways, ssh keys, VM's resources....

After play build.ym you will get a hosts inventory file like this:

# inventory hosts file

Then you can play cluster-install.yml

You also have the option to reset everything using cloud-reset.yml and then build-reset.yml (Last one will create a build.bak file with your last settings) See ya!