A guide to an HA deployment of Kubernetes, using Kubespray and as few cloud components as possible!
This is a conscious decision. We know life is easier in the cloud, yet we must also be able to deploy on-prem.
As such, we follow a dual approach, providing instructions for both a deployment on AWS, as well as Bare Metal for each of the respective sections below.
Note: This guide is still being refined. Feedback is welcome!
This guide is structured as follows:
- 1. Set Up Kubernetes Host Machines
-
Prepare the hosts, before installing kubernetes, depending on if you’re using bare metal, virtual private servers, EC2 instances, etc.
- 2. Requirements
-
A couple of basic things you’ll need to take care of before beginning to install your cluster.
- 3. Install Kubernetes
-
Use the Ansible playbooks / recipes provided by the Kubespray project, in order to set up your Kubernetes cluster.
- 4. High-Availability without AWS ELB
-
Even if you have an HA K8s cluster, you still need an HA way to bring traffic into your cluster. Your best option is to use one of the cloud providers' Load Balancers (e.g. AWS ELB), but what if you can’t / don’t want to?
- 5.Set Up Persistent Storage for K8s
-
At some point, some apps will need some persistent storage (that can even survive K8s cluster restarts). GlusterFS is nice like that and can help you with this.
- 6. Deploying Apps to Kubernetes
-
Finally, we’ll look at how to deploy some basic apps on Kubernetes.
Let’s start by 1. Setting Up the Hosts on which we’ll install our Kubernetes cluster!