/k8s-on-raspbian

Kubernetes on Raspbian (Raspberry Pi)

Primary LanguageShellMIT LicenseMIT

Kubernetes on Raspbian

This repository holds the "original tutorial" for "Kubernetes on Raspbian" by Alex Ellis using kubeadm. It also has a list of reader's clusters for your inspiration and Alex's newest work with k3s.

My modest stack of RPis

If you'd like to read more about Kubernetes clusters, see Alex's write-up over the past 5 years of building with Docker and these tiny devices:

Five years of Raspberry Pi Clusters

Start the guide

Pick between k3s or kubeadm.

1) Pick k3s (recommended)

My current recommendation is to use k3s from Rancher Labs. It is normal Kubernetes and passes the conformance tests written by the CNCF. I'm yet to be convinced of why someone wouldn't use this for a hobbyist build and I've been pleasantly surprised by it. Rancher Labs offers commercial support and k3s is GA, even more reason to use this option.

k3s is:

  • faster, and uses fewer resources - 300MB for a server, 50MB for an "agent"
  • well-maintained and ARMHF / ARM64 just works
  • HA is available as of k3s 1.0 along with Kubernetes 1.16
  • still normal, upstream, compliant Kubernetes
  • doesn't appear to run into some of the complicated issues we've seen with kubeadm

k3sup diagram

You may also enjoy k3sup ("ketchup") - a tool I built with the community to bootstrap k3s clusters over SSH. It has a simple k3sup install / join syntax and is available on GitHub. See more at: https://k3sup.dev

Start with a tutorial now (newest listed first):

2) Or pick kubeadm (advanced users)

This guide is part of a larger blog post: Build your own bare-metal ARM cluster.

My current thinking is that only advanced users should attempt to install Kubernetes with kubeadm. Historically, it's had some unfortunate issues around timeouts and being slow, k3s makes installation and operation seamless.

Once you're up and running please share your clusters on Twitter with @alexellisuk.

You can also join the OpenFaaS Slack community's dedicated channel for ARM and Raspberry Pi #arm-and-pi. Just email alex at openfaas dot com for your invitation.

Attribution

You're welcome to make use of this guide and to refer to it, but please do not copy it or pass it off as your own without giving attribution to the author(s). If you have suggestions or have found that some of the instructions have fallen out of date, then please see the Contributions section below on how to contribute.

Reader's clusters

Submit your cluster and description by creating a GitHub issue.

Adaptations / derived works

Contributions

See: CONTRIBUTING