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:

On to the original post…


April 2018

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.

Kube-Linode

One of the simplest approaches is by Andrew Low:
https://github.com/kahkhang/kube-linode

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.

Ansible

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).

Terraform

The Linode technical writing team has offered up a guided solution that takes advantage of Kubespray and Ansible:

https://linode.com/docs/applications/containers/deploy-minio-on-kubernetes-using-kubespray-and-ansible/

DIY

Kiran Sing contributed a guide that spares no detail in bootstrapping a cluster by hand:

https://linode.com/docs/applications/containers/how-to-deploy-nginx-on-a-kubernetes-cluster/

Pharmer

The most complete solution that I have discovered in the community is by AppsCode called Pharmer.

https://github.com/pharmer/pharmer/blob/master/docs/cloud/linode/README.md

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.

Cluster API

The Kubernetes Cluster API will help these tools to approach the problem of bootstrapping a cluster in a similar way.

https://github.com/kubernetes/kube-deploy/tree/master/cluster-api

The Question

  • What tools have you been using?

  • What features are you most looking forward to?

  • What have you found useful or lacking along the way?

3 Replies

There are more than a few updates worth mentioning here:

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct