Keep your main desktop OS clean when playing with Kubernetes, with Vagrant and KinD!
- Vagrant
- VirtualBox > version 6.1
- vagrant-disksize plugin (required)
vagrant-dns
plugin (optional, Mac OS X only)
git clone --recurse-submodules <THIS REPO URI> vagrant-kind
cd vagrant-kind
vagrant up
vagrant ssh
# Inside vagrant guest
kind create cluster
# If you forget '--recurse-submodules'...
git submodule update --init --remote
To expose K8s ports properly to the Host OS, be sure to add --address 0.0.0.0
to relevant networking kubectl commands. Example:
kubectl port-forward -n kubernetes-dashboard service/dashboard-kubernetes-dashboard 8080:443 --address=0.0.0.0 &
vagrant-dns
plugin users can use the hostname "kind.test" to reach ports exposed. Others will need to use the IP "192.168.61.10".
Need ideas for what to do with this cluster? Check out KIND's resources.
Also, browse through the ArtifactHub.
There are some raw experiments available in the extras subdirectory.
Thank you to:
- the authors of the Ansible roles I've integrated as git submodules in roles/.
- HashiCorp for making Vagrant
- And thanks to the devs behind KinD!