Configure a Kubernetes cluster with 1 master and 2 worker nodes.
Vagrant and VirtualBox are required. And based on macOS.
$ brew cask install virtualbox
$ brew cask install vagrant
$ brew cask install vagrant-manager
$ vagrant plugin install vagrant-hostmanager
$ vagrant up
# login to master node
$ vagrant ssh
# login to worker node
$ vagrant ssh k8s-worker-1
$ vagrant ssh k8s-worker-2
vagrant up
completes successfully, you can access the dashboard. It may take a few more minutes for ingress and dashboard pods to finish working properly.
You can find the dashboard access URL in the folder below. (config file and token is in the same directory)
/shared/dashboard.url
/shared/config
/shared/token.txt
$ brew install kubernetes-cli
$ mkdir -p ~/.kube
$ cp ./shared/config ~/.kube/config
# make sure you are connected
$ kubectl get nodes
https://kubernetes.io/docs/home/
When you're all done, tell Vagrant to destroy the VMs.
$ vagrant destroy -f