A working Vagrant setup using VMware Fusion on MAC.
To provision the cluster, execute the following commands.
Important Note: You have to use sudo with all the vagrant commands.
git clone https://github.com/mtyler/vagrant-kubeadm.git
cd vagrant-kubeadm
sudo vagrant up
Once the cluster is up, run kubeadm using the provided script on the control plane node
cd vagrant-kubeadm
vagrant ssh cp1
sudo /vagrant/scripts/kubeadm-init-cp1.sh
Follow the instructions in the log output to join remaining nodes
You can connect to the Vagrant cluster from your local mac terminal by configuring the following.
cd vagrant-kubeadm
cd configs
sudo chmod +r config
export KUBECONFIG=$(pwd)/config
or you can copy the config file to .kube directory.
cp config ~/.kube/
Validate the cluster access
kubectl get po -n kube-system
There are a number of scripts under the tasks folder that may/may not be useful.
sudo vagrant halt
sudo vagrant up
sudo vagrant destroy -f