Code to Kubernetes in 15 Minutes

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!

Download

You can get the code from here: https://github.com/xanmanning/vagrant-kubernetes-cluster

Here’s what gets deployed!

  1. An NFS server for Persistent Volumes
  2. 3 Kubernetes Nodes (1 master, 2 workers). This can be increased in Vagrant.

K8s Cluster Diagram

Demonstration

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.