HA Kubernetes cluster with Vagrant+CoreOS+Ansible, Part 1

HA Kubernetes cluster with Vagrant+CoreOS+Ansible, Part 1

Kubernetes is a production level containers orchestration tool that helps to automating deployment, scaling and manage your containers. The official recommended way of running a local Kubernetes cluster is to use minikube, it is the easiest way to get started. However the shortage of this is very obvious.

You can’t emulate a HA cluster as minikube setups a single node environment.

The details of how the Kubernetes cluster runs are pretty much shadowed, you don’t get the chance to build it step by step, and understand what are the building blocks and how they work together to form the cluster.

This post tries to build a Kubernetes cluster from scratch to achieve a minimum HA setup with 4 CoreOS virtual machines, 3 masters and 1 workers

This ignition configuration will permanently disable the auto-update and rebooting of the container linux for us.

Up to this point we are able to create container linux masters, however we can’t use Ansible to provision these machines yet because Ansible requires the target machine to have python installed but container linux doesn’t come with python natively due to its nature of having only components needed to run containers. In order to solve this problem, we have to install pypy first, we’re able to do it taking advantage of Ansible’s raw module (module that doesn’t require python). Let’s create the playbook.yml: