Git Product home page Git Product logo

libvirt-k8s-provisioner's Introduction

libvirt-k8s-provisioner - Automate your cluster provisioning from 0 to k8s!

Welcome to the home of the project!

With this project, you can build up in minutes a fully working k8s cluster (single master/HA) with as many worker nodes as you want.

Terraform will take care of the provisioning of:

  • Loadbalancer machine with haproxy installed and configured for HA clusters
  • k8s Master(s) VM(s)
  • k8s Worker(s) VM(s)

It also takes care of preparing the host machine with needed packages, configuring:

You can customize the setup choosing:

  • container runtime that you want to use (docker, cri-o, containerd).
  • service CIDR to use during installation.
  • pod CIDR to use during installation.
  • network plugin to use, based on the documentation. Defaults to Calico. (WIP)
  • nginx-ingress-controller if you want to enable ingress management.
  • Rancher installation to manage your cluster.
  • master schedulable if you want to schedule on your master nodes or leave the taint.

All VMs are specular,prepared with:

The user is capable of logging via SSH too.

Quickstart

The playbook is meant to be ran against a/many local or remote host/s, defined under vm_host group, depending on how many clusters you want to configure at once.

ansible-playbook main.yml

You can quickly make it work by configuring the needed vars, but you can go straight with the defaults!

Recommended sizings are:

Role vCPU RAM
master 2 2G
worker 1 1G

vars/k8s_cluster.yml

k8s:
  control_plane:
    vcpu: 2
    mem: 4
    vms: 2
    disk: 10

  worker_nodes:
    vcpu: 1
    mem: 2
    vms: 1
    disk: 10

  network:
    pod_cidr: 10.200.0.0/16
    service_cidr: 10.50.0.0/16
    cni_plugin: calico

  container_runtime: docker
  master_schedulable: false
  install_nginx: false
  install_rancher: false

Size for disk and mem is in GB. disk allows to provision space for pod's ephemeral storage.

VMS are created with these names by default (customizing them is work in progress):

- k8s-loadbalancer.**domain**
- k8s-master-N.**domain**
- k8s-worker-N.**domain**

These are the default for libvirt resources:

vars/libvirt.yml

libvirt:
  network:
    domain: k8s.lab
    name: k8s
    net: 192.168.200.0/24
  storage:
    pool_name: k8s
    pool_path: /var/lib/libvirt/images/k8s

Feel free to suggest modifications/improvements.

Alex

libvirt-k8s-provisioner's People

Contributors

kubealex 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.