How do you deploy Kubernetes on Linode?
Updates (last modified March 26, 2019)
This post was written when resources for deploying Linode were scarce. As noted in the comments, this is no longer the case.
linode.com/k8s provides the latest information about Kubernetes tools for Linode.
Since this post, I've discussed other related topics in this community forum:
- The Linode Kubernetes module for Terraform
- Linode Block Storage CSI Driver
- Using External-DNS in Kubernetes with Linode Domains
- Scaling Rancher deployed Kubernetes clusters on Linode with various sized Node Templates (Node Groups)
On to the original post…
I'm aware of a number of ways to deploy a Kubernetes cluster on Linode. I wanted to share this list, because I am curious how other Linode users approach Kubernetes deployments.
One of the simplest approaches is by Andrew Low:
This shell script API wrapper side-loads CoreOS Linodes with CloudInit profiles and creates a resizable cluster preinstalled with Grafana, Kube-Prometheus, Rook, and Traefik. The shell script APIv3 implementation is borrowed and extended from another project and it is amazing to see how simply this was done.
Ansible and Terraform
While other Kubernetes installing systems like Kubespray and Kubicorn do not have direct Linode support (yet), they do support provisioning through other tools, such as Ansible and Terraform.
Camron Flanders started a project that uses a Linode Terraform provider to provision a K8s cluster, https://github.com/camflan/linode-k8s .. I believe this project is a work-in-progress as my master node wasn't responsive after provisioning, but it was otherwise quick and impressive.
A common trend I've been seeing in these tools is to deploy a master node with no less than 4G of RAM (I may have under-powered it).
The Linode technical writing team has offered up a guided solution that takes advantage of Kubespray and Ansible:
Kiran Sing contributed a guide that spares no detail in bootstrapping a cluster by hand:
The most complete solution that I have discovered in the community is by AppsCode called Pharmer.
This seemingly small team has carved and dished out many of the pieces required to make a fully integrated Linode Kubernetes solution. These pieces can be consumed by the other projects that I've mentioned and any other Kubernetes cluster that wants to manage Linode resources natively.
APIv4 Go client
The release of the RESTful Linode APIv4, makes all aspects of Linode resources available to tools like these.
As the Linode APIv4 Go wrappers start to manifest, we can expect to see more rapid development of Linode support in these and future tools.
Toward these ends, I have been working on https://github.com/chiefy/go-linode with Christopher Najewicz, to become an APIv4 replacement for the most popular APIv3 Go client which Pharmer has extended considerably.
This APIv4 client will be used to revamp the Terraform support started by Brendan Tobolaski. This work is happening at https://github.com/displague/terraform-provider-linode.
I invite anyone interesting in fleshing out these tools to reach out to me.
The Kubernetes Cluster API will help these tools to approach the problem of bootstrapping a cluster in a similar way.
What tools have you been using?
What features are you most looking forward to?
What have you found useful or lacking along the way?
There are more than a few updates worth mentioning here:
- The Go wrapper is now hosted at:
- The Terraform Provider is now official:
- A Linode Cluster API implementation is at:
- Linode support is included in External-DNS:
A Work-In-Progress CSI and CCM are bundled in this Terraform config repo that provisions a Kubernetes Cluster:
Other Kubernetes Terraform configs exist:
You can now also use the Linode CLI to terraform a cluster with 1 command.
You can find more details on that here: https://developers.linode.com/kubernetes/
Several developments since this post are discussed in my Linode Kubernetes for Terraform update post.