This script help to create Kubernetes cluster on Virtual Box with dynamic number of nodes. Scripts help you to execute your multi-nodes scenarios. You can test your load, find bottle neck of your application.
Create cluster require 2 primary components
- VirtualBox
- Vagrant
git clone https://github.com/ankurloriya/create-kubernetes-cluster-using-vagrant.git && cd create-kubernetes-cluster-using-vagrant
sudo apt update
sudo apt install virtualbox
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
Configure number of node by edit vagrantfile
. In file there will be box = []
variable. which you need to update of create node and and setup internal IP addresses.
After that you just execute
vagrant up
vagrant halt
vagrant destroy