In this tutorial, I will show you the incredible speed when deploying a Kubernetes cluster on Civo. In fact, I will start my kettle and before it's finished boiling my cluster will already be waiting for me to deploy workloads.

To follow along in this tutorial, you will need to have a Civo account and, for the time of writing, be part of their #KUBE100 beta program. You can apply for access to the beta here.

A Kubernetes cluster on Civo takes less than 2 minutes to provision:

image

Installing Civo CLI Tools:

Civo's CLI tools depends on Ruby, I use rbenv to manage my ruby versions, if you don't have ruby installed, you can run the following:

$ brew install rbenv ruby-build
$ export LDFLAGS="-L/usr/local/opt/readline/lib"
$ export CPPFLAGS="-I/usr/local/opt/readline/include"

Then you can select any version from the output when you list, using rbenv list, but I will use version 2.5.1:

$ rbenv install 2.5.1
$ rbenv global 2.5.1

Then install the civo gem, I will install it as a normal user:

$ export GEM_HOME=~/.gem
$ export GEM_PATH=~/.gem
$ export PATH=${PATH}:${GEM_PATH}
$ gem install civo_cli

Obtain your Civo API key from your account, then set your API key via the CLI:

$ civo apikey add default your-api-key
Saved the API Key your-api-key

Make sure your API key is set:

$ civo apikey list
+---------+----------------------------------------------------+----------+
| Name    | Key                                                | Default? |
+---------+----------------------------------------------------+----------+
| default | .................................................. | <=====   |
+---------+----------------------------------------------------+----------+

Kubernetes CLI Tools:

Install kubectl to interact with kubernetes and kubectx that will manage your kube context:

$ brew install kubernetes-cli
$ brew install kubectx

Deploy a Kubernetes Cluster on Civo

Deploy a 2 node Kubernetes Cluster on Civo, which should take less than 2 minutes:

$ civo kubernetes create --size=g2.small --nodes=2 --wait
Building new Kubernetes cluster extreme-radius: Done
Created Kubernetes cluster extreme-radius in 01 min 28 sec

Pretty fast right? Now save your kubeconfig's context to your default configuration path:

$ civo kubernetes config extreme-radius --save
Merged config into ~/.kube/config

Switch the context to your cluster:

$ kubectx extreme-radius
Switched to context "extreme-radius".

Use kubectl to view the nodes:

$ kubectl get nodes
NAME               STATUS   ROLES    AGE   VERSION
kube-master-7f0b   Ready    master   59s   v1.14.6-k3s.1
kube-node-b172     Ready    worker   44s   v1.14.6-k3s.1

And boom! A kubernetes cluster deployed in less than 2 minutes.

References

Say Thanks!

That’s it. Thanks for reading, follow me on Twitter and say hi! @ruanbekker