GithubHelp home page GithubHelp logo

lapd-devops / terraform-kvm-kubespray Goto Github PK

View Code? Open in Web Editor NEW

This project forked from musicdin/kubitect

0.0 1.0 0.0 21 KB

Set up Kubernetes cluster using KVM, Terraform and Kubespray

License: Apache License 2.0

HCL 66.94% Smarty 33.06%

terraform-kvm-kubespray's Introduction

terraform-kvm-kubespray

Set up Kubernetes cluster using KVM, Terraform and Kubespray

Requirements

Usage

Create cluster

Move to main directory:

cd terraform-kvm-kubespray

Change variables to fit your needs:

nano terraform.tfvars

Execute terraform script:

# Initializes terraform project
terraform init

# Shows what is about to be done
terraform plan

# Runs/creates project
terraform apply

Note: Installation proccess can take up to 20 minutes.

Add worker to cluster

In terraform.tfvars file add:

  • MAC address for new VM to vm_worker_macs and
  • IP address for new VM to vm_worker_ips.

Note: MAC and IP addresses for certain VM have to be on same index in array.

Execute terraform script to add worker:

terraform apply -var 'action=add_worker'

Remove worker from cluster

  • TBD - (Not tested yet)

Upgrade cluster

In terraform.tfvars file modify:

  • k8s_kubespray_version and
  • k8s_version.

Execute terraform script to upgrade cluster:

terraform apply -var 'action=upgrade'

Credits

This script is modified to work with KVM instead of vSphere.

Script that works on vSphere can be found here.

Info/Issues

In case you found a bug or dysfunctionality please open an issue.

If you need anything else contact me on GitHub.

terraform-kvm-kubespray's People

Contributors

musicdin avatar

Watchers

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.