This project launches a local Kubernetes cluster (one master, two workers) with Vagrant. I use it for testing Helm chart deployments locally before provisioning into a more production-like environment.
To get a local copy up and running follow these simple steps.
-
Clone the repo
git clone https://github.com/bthomas1/local-k8s.git
-
Bring the cluster up
vagrant up
The only requirements for this cluster deployment is to have a recent version of Vagrant and VirtualBox installed. Hardware-wise, you should have around 6GB of RAM to spare, as each node is allocated 2GB. A few CPU cores is useful, too.
The cluster will make use of the 192.168.50.0/24 subnet for VirtualBox hosts and LoadBalancer IPs. Your local PC will create a local route to this subnet, which might cause issues if your existing network uses this subnet.
- Clone the repo
git clone https://github.com/bthomas1/local-k8s.git
- Install NPM packages
vagrant up
Vagrant will launch three VMs according to the configuration defined in ./Vagrantfile, and then provision Kubernetes using the Ansible playbooks located under ./kubernetes-setup/
The cluster itself is barebones; the only main addition being the installation of MetalLB to support the creation of Loadbalancers that would otherwise be created by a cloud platform.
Distributed under the MIT License.