Install VirutalBox version 6.0.14 https://www.virtualbox.org/wiki/Download_Old_Builds

Install Vagrant 2.2.5

Install vagrant on mac: https://releases.hashicorp.com/vagrant/

Uninstall vagrant on mac:

rm -rf /opt/vagrant rm -f /usr/local/bin/vagrant sudo pkgutil –forget com.vagrant.vagrant

cd ~ curl -O https://dl.google.com/go/go1.13.6.linux-amd64.tar.gz tar xvf go1.13.6.linux-amd64.tar.gz sudo chown -R root:root ./go sudo mv go /usr/local sudo cat « EOF » ~/.profile export GOROOT=/usr/local/go export GOPATH=$HOME/work export PATH=$PATH:$GOROOT/bin:$GOPATH/bin echo “Profile loaded..” EOF source ~/.profile

exec: “gcc”: executable file not found in $PATH $ sudo apt-get install build-essential

mkdir -p $GOPATH/src/k8s.io cd $GOPATH/src/k8s.io git clone https://github.com/kubernetes/kubernetes cd kubernetes make

Create folder structure to store Vagrantfile Spin-up a Ubuntu server through Vagrant

/Users/sushiver/Work/code/vermanotes/vagrant_demo/ubuntu-server/ubuntu-18.04

Vagrantfile Vagrant.configure(“2”) do |config| config.vm.box = “ubuntu/bionic64” config.vm.synced_folder “~/Work/code/vermanotes/vagrant_demo/ubuntu-server/ubuntu-18.04/shared_data”, “/home/vagrant/shared_data” config.disksize.size = ‘50GB’ config.vm.network “private_network”, ip: “192.168.10.5” config.vm.provision “file”, source: “~/Work/code/vermanotes/vagrant_demo/ubuntu-server/scripts/setup-docker.sh”, destination: “/home/vagrant/”

config.vm.provision “shell”, inline: “/bin/sh /home/vagrant/setup-docker.sh”

config.vm.provider “virtualbox” do |vb| vb.gui = false vb.name = “Kubernetes Sandbox” vb.memory = “4096” vb.cpus = “2” end end

Setup docker on Vagrant start-up:

!#/bin/bash sudo apt-get update -y curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER sudo reboot