GithubHelp home page GithubHelp logo

redestroyder / terraform-kubernetes-deployment Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 6.0 32 KB

KVM libvirtd Deployment of Kubernetes via Kubespray

License: MIT License

Shell 67.83% HCL 32.17%
kubernetes ansible terraform kvm libvirtd kubectl-commands

terraform-kubernetes-deployment's Introduction

Terraform Kubernetes Deployment

This repository contains bash scripts to deploy virtual machines and later create a Kubernetes cluster from them

To configure deployment:

  • Edit main.tfvars to your needs
  • Start ./terraform-install.sh
  • I recommend using kubespray to install k8s. My configuration is included in kubespray/inventory/cluster.
    My kubespray configuration uses: flannel, metallb, dashboard and local-path-provisioner
  • You MUST change node IP addresses in inventory.ini to IPs returned by terraform output
  • To start kubespray: cd kubespray ansible-playbook -i inventory/cluster/inventory.ini --user cmemb --become --become-user=root --private-key ~/.ssh/id_rsa cluster.yml

P.S. Util scripts containing virsh calls sudo inside because installation uri is qemu:///system (Can be changed in libvirt conviguration in main.tf) Networking is done via creating new network kube and IP distribution is done via dhcp4 It can lead to problems with MetalLB. If you want to use MetalLB with different ip range, than of kube subnet, you must do necessary routing by yourself. This repository doesn't cover it (yet)
If you don't want to - just specify address range matching the one of subnet. You can find MetalLB configuration in kubespray/inventory/cluster/group_vars/addons.yml or you can change it later via kubectl edit configmap -n metallb-system config P.S.S. MetalLB Readiness probe may be failing due to: strconv.Atoi: parsing "metrics": invalid syntax (but the pods are working eventually, haven't worked it out yet)

Everything here is a subject to change Reasoning behind this repo is basically to store history of my attempts in creating personal cluster (Many of which are forever erased)

You're free to use any of these! I hope these snippets of mine will help somebody)

Kubespray is licensed under Apache 2.0 License

terraform-kubernetes-deployment's People

Contributors

redestroyder avatar

Watchers

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