Coder Social home page Coder Social logo

k8s_provisioner's Introduction

Create and provision k8s cluster

libvirt resources (./libvirt)

  • Creates libvirt network related resources
  • Enables subnet dns with dnsmasq

kvm and k8s cluster init (./cluster)

  • Creates kvms with specified roles of loadbalancer, control plane, and worker node
  • Installs k8s and joins each control plane and worker node kvm to form a cluster
  • Installs calico for cluster networking

configuration

configure the libvirt resources as ansible variable file and pass its path via extra_vars

Libvirt configuration

libvirt:
  version: v1                                     # versioning for the cluster
  namespace: k8s                                  # namespace used for naming libvirt resources
  uri: "qemu+ssh://hanapedia@ubuntuhome/system"   # virsh uri
  
  network:
    domain: k8s.home                              # local dns domain
    network_cidr:
      - 192.168.100.0/24                          # network cidr block to be used for DHCP

Kvm resource configuration

k8s:
  cluster_name: home-cluster # name prefix used for kvms

  control_plane:
    cpu: 2    # number of vcpus for each kvm of the role
    mem: 4    # amount of memory allocated for each kvm of the role
    vms: 2    # number of kvm for the role
    disk: 16  # amount of disk space for each kvm of the role

  node:
    cpu: 2
    mem: 8
    vms: 3
    disk: 24
  
  loadbalancer:
    cpu: 1 
    mem: 4 
    vms: 1 
    disk: 8 

Further configuration for kvm and cluster

any variables in ./cluster/ansible/group_vars/all.yaml can be overwritten. But use with care.

k8s_provisioner's People

Contributors

hanapedia avatar

Watchers

 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.