As you may recall, a couple of on-call’s ago I started crafting a Kubernetes cluster using Vagrant and Ansible. Well I have decided to upload my code to GitHub!
You can get the code from here: https://github.com/xanmanning/vagrant-kubernetes-cluster
Here’s what gets deployed!
- An NFS server for Persistent Volumes
- 3 Kubernetes Nodes (1 master, 2 workers). This can be increased in Vagrant.
In the below demo I go from sourcecode, to a 3 node cluster + storage in 15 minutes. I then deploy a MySQL Stateful Set which takes us up to 22 minutes.
I’m always amazed how I can go from 650Kb of code to 4 virtual machines running a test Kubernetes Cluster.
It’s long and there’s a lot of pauses.