Coder Social home page Coder Social logo

k8s-demo-installer's Introduction

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 https://github.com/p1nrojas/ansible-kubeadm-nuage. This project is building a K8s cluster v1.5 thru a playbook.

Requirements

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 http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 > /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

Configuration

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
[masters]
master.nuage.lab
 
[minions]
minion01.nuage.lab
minion02.nuage.lab

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!

k8s-demo-installer's People

Contributors

p1nrojas avatar

Stargazers

Jerrod Gerth avatar Alex Kamalov avatar

Watchers

LV Nilesh avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.