DEV Community

Cover image for From 0 to a working k8s cluster with Ansible
Alessandro Rossi
Alessandro Rossi

Posted on

From 0 to a working k8s cluster with Ansible

Hi guys, hope you are good and safe!

I wanted to share a little tool that I created to provision a fully working k8s cluster in about 20 mins just using Ansible, terraform and libvirt.

It supports now k8s 1.19 and cri-o 1.19.

GitHub logo kubealex / libvirt-k8s-provisioner

Automate your k8s installation

License: MIT

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).
  • schedulable master if you want to schedule on your master nodes or leave the taint.
  • service CIDR to be used during installation.
  • pod CIDR to be used during installation.
  • network plugin

Click on the collapsible for a short description of the tool or just head to the github repo to try it out!

SPECS

It will provision:

  • 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).

  • schedulable master if you want to schedule on your master nodes or leave the taint.

  • service CIDR to be used during installation.

  • pod CIDR to be used during installation.

  • network plugin to be used, based on the documentation. Project Calico Flannel

  • nginx-ingress-controller or haproxy-ingress-controller if you want to enable ingress management.

  • Rancher installation to manage your cluster.

  • Rook-Ceph operator

Feel free to enjoy it and contribute, if you want!

Top comments (0)