18 April, 2018

Create Kubernetes Multinode Cluster using multiple VMs

If you need to run single node Kubernetes cluster for testing then minikube is your choice.

But sometimes you need to run tests on a multinode cluster running on multiple VMs.

There are many ways how to install Kubernetes Multinode Cluster but I choose these projects kubeadm and kubespray.


  • Kubespray is handy for enterprise installations where HA is a must, but it can be used for standard testing if you have Ansible installed.
  • Kubeadm is official tool for Kubernetes installation, but it needs more love when you want to use it in enterprise to configure HA.

Let's look at these two projects, how "easy" is to install Kubernetes to multiple nodes (VMs):

Kubeadm

Here are the steps:



If you want to do it quickly with creating the VMs in Linux you can use this script:

https://github.com/ruzickap/multinode_kubernetes_cluster/blob/master/run-kubeadm.sh

It will create 4 VMs using Vagrant (you should have these vagrant plugins installed: vagrant-libvirt + vagrant-hostmanager) and install Kubernetes using kubeadm.


Kubespray

Kubernetes installation with Kubespray is little bit more complicated. Instead of writing it here I'll point you to another script which you can use for it's automation:

https://github.com/ruzickap/multinode_kubernetes_cluster/blob/master/run-kubespray.sh

It will create 4 VMs using Vagrant (you should have these vagrant plugins installed: vagrant-libvirt + vagrant-hostmanager) and install Kubernetes using kubespray+ansible.


Enjoy... :-)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.