This repository will create a Kubernetes Cluster, using Kubespray, so it can be used for a Lab Environment.
It will create 4 VMs:
- node0[1-3]: 1 k8s master and 2 worker nodes (2 vcpu and 4GB RAM each)
- controller: controller node (2 vcpu, 2GB RAM)
kubectl binary will be installed on the controller node.
This repository was tested using
Check the variables defined on the .env file.
NOTE: The bootstrap uses the ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub,
so if you don't have these files, you need to create using:
ssh-keygen -t rsaTo create the k8s cluster just run:
vagrant up
vagrant provision --provision-with k8sYou can now connect to the controller node and use kubectl using:
vagrant ssh controller
kubectl cluster-info- This uses the following Vagrant plugins (automatically installed):
- vagrant-hostmanager
- vagrant-env
- You can change some variables for kubespray in the
.envfile (or using environment variables)
The following environment variables can be used to overwrite values from .env file:
- KUBESPRAY_VER
Read the pre-commit hooks document for more info.
Read the git-chglog document for more info.

