Simple way to set up a kubernetes cluster with vagrant on virtualbox
The following are the system prerequisites:
- 8Gb of RAM minimum
- 2.4GHz processor or higher
- Git - Git
- Virtual Box - Virtualization software.
- Vagrant - Virtual machine management tool.
- Clone the following repository by using this statement:
git clone https://github.com/hfmartinez/kubernetes-vagrant.git
- Inside the repository folder that contains the Vagrantfile, start the virtual machines:
vagrant up
- Run the next command to validate the installation
vagrant ssh master -c 'kubectl get nodes -o wide'
Change NodeCount inside Vagrantfile
Vagrant.configure(2) do |config|
# Change to add more workers
NodeCount = 1
#global requirements
config.vm.provision "shell", path: "requirements.sh", :args => NodeCount
Change the following parameters inside Vagrantfile
#master
master.vm.provider "virtualbox" do |v|
v.name = "master"
v.memory = 2048
v.cpus = 2
end
#workers
worker.vm.provider "virtualbox" do |v|
v.name = "worker#{i}"
v.memory = 2048
v.cpus = 1
end
- This repository was forked from Innablr/K8s_ubuntu
- Installing Addons for Kubernetes Installing Addons