Vangrantfile and Ansible roles to set up a Kubernetes lab.
- Vagrant
- Virtualbox
- Ansible
- kubectl (to interact with the cluster)
- After installing the prerequisites you should be able to run and sit back while the cluster is configured.
vagrant up
- Export the KUBECONFIG variable pointing to the resulting admin.conf on the root of the proyect.
export KUBECONFIG=$(pwd)/admin.conf
- Verify everything is fine by querying the nodes.
kubectl get nodes
NAME STATUS ROLES AGE VERSION
controller-0 Ready master 1h v1.10.0
worker-0 Ready <none> 1h v1.10.0
worker-1 Ready <none> 1h v1.10.0
worker-2 Ready <none> 1h v1.10.0
Have fun!