Deploying kubernetes in Abiquo using Rancher

About Abiquo, kubernetes and Rancher

You probably read something about kubernetes on a daily basis, but still, I will show you a way to easily deploy kubernetes clusters in Abiquo using the recently launched Rancher 2.0. Rancher is an enterprise management platform that with its 2.0 version has turned all in with kubernetes, providing a very easy way to deploy and manage kubernetes clusters in a wide variety of platforms.

Abiquo’s Docker Driver

One of the options you have for cluster deployments is to use any driver Docker machine can handle, and since there is already an Abiquo driver for Docker machine, it is very easy to get Rancher to deploy kubernetes clusters on top of Abiquo.

I assume you already have a Rancher server running, but in case you don’t, bootstrapping a server is very easy and you can find instructions at Rancher’s website.

First Steps

Now, the first step is to make Rancher able to deploy hosts in Abiquo by installing the Docker machine driver in it. Head to the “Node drivers” screen, click “Add node driver” and use the URL of the latest Linux build of the driver available here. For now there is no customized UI for the driver, so you can go ahead and click “Create”.

Adding the Docker node driver

Click to zoom

Add a cluster

Once the driver becomes active, you can return to the clusters screen and click that big nice “Add cluster” button. Make sure you see and select “Abiquo” as a driver, then fill in the cluster name. Scroll at the bottom and add a template in the first node pool. That template is the config to deploy a new cluster host.

The form you will see presents you every single option available in the Abiquo driver for you to use. Fill in the details as needed and give the template a name. You will be returned to the cluster screen where you will be able to use that template in the different node pools. Since this will be a small demo cluster, I will just use 2 pools, one for the master (etcd + control plane) and one for the worker nodes.

Adding a cluster with the Abiquo driver

Click to zoom

Done!

And… that’s pretty much it! Once you click on create make sure you have a coffee at hand and watch Rancher deploy the VMs in Abiquo, provision Docker on them, then deploy the necessary services to run the cluster.

Deploying services

Click to zoom

Once the cluster has finished deploying hosts and become ACTIVE, you can download the config file for the kubeconfig client tool so you can interact with the cluster, but one of the nicest things about Rancher is that it will provide you a service catalog that you can immediately deploy to your new cluster.

The Rancher service catalog

Click to zoom

And if you feel (and you probably will) that one host is not enough for your workloads, fear not. Just select your cluster, click the “Nodes” screen, locate the “worker” node pool we just created and click the “+” sign next to the node count. Rancher will take care of deploying a new node and join it to the cluster so you can use more resources for your workloads.

Deploying a new node

Click to zoom