I recently built a tool called k3sup or ('ketchup') which installs Kubernetes on any PC, VM or Raspberry Pi using k3s from Rancher. k3s is a super light-weight Kubernetes distribution perfect for the edge, IoT and embedded systems.

In this post I'll share my new Insiders video with you "Kubernetes Homelab with Raspberry Pi 4" and the tools and links you need to try everything out at home.

k3sup started off as a wrapper for the k3s installation scripts, but after feedback from the community, it quickly gained a command to build clusters. The next step for k3sup was the ability to install projects built for Kubernetes.

In this video I'll show you how to use a single binary to setup a Kubernetes cluster on your Raspberry Pi 4, how to install OpenFaaS, and how to get a public IP on the Internet for your RPi homelab.

Watch the video

k3sup reference

Here's a quick reference for k3sup, that you can also find on the project homepage.

You can use k3sup with any VM or PC, you just need SSH access. It also works with ARMHF (Raspberry Pi) and ARM64 (Packet/Graviton).

Get the tool or update curl -SLsf https://get.k3sup.dev | sudo sh

Start a new cluster k3sup install --ip $SERVER_IP --user pi

Join an agent/worker into the cluster k3sup join --ip $AGENT_IP --server-ip $SERVER_IP --user pi

Install OpenFaaS on ARMHF, ARM64 or a PC/VM k3sup app install openfaas [--load-balancer] [--basic-auth] k3sup actually works on any Kubernetes cluster, so if you like the tool, you can use it to install OpenFaaS.

inlets-operator

The other part of the video showed the inlets-operator. It gave us a public IP for our cluster within a matter of seconds.

Having a public IP isn't strictly necessary, but it can be a great way to share your work and integrate with third-party systems and event-sources like GitHub, Strava, and Stripe.

There's simply three steps needed to get public IPs for your local cluster.

Note these steps may have changed a little since the original video was rceorded.

The Operator obtains a public IP for you by creating a low-cost VM on DigitalOcean, Packet.com is also supported. The VM costs 5 USD / mo.

Create an API key on your DigitalOcean account Save it as ~/Downloads/do-access-token Install the operator # k3sup can install the operator curl -sSLf https://get.k3sup.dev | sudo sh k3sup app install inlets-operator \ --token-file=$HOME/Downloads/do-access-token Create a Service type LoadBalancer That's it, you'll now get public IPs showing up for any LoadBalancer service you create.

CNCF Landscape and new logo

Oh, and here's a small announcement I'm happy to share:

Really excited to see @inletsdev growing up and leaving home with its own @github org and a place on the @CloudNativeFdn Landscape.



A big thank you to @iboonox for providing a logo. Website will be coming soon.



Check it out, give it a ⭐️https://t.co/5pPjk2MlpH pic.twitter.com/NuDqCgkN5g — Alex Ellis (@alexellisuk) October 16, 2019

The inlets project now has its own GitHub organisation: github.com/inlets/inlets and is listed on the CNCF Landscape

Get the materials

You may already have the parts, but if you don't, feel free to check out these affiliate links on Amazon. If you're in the UK and in Europe, you may prefer to use Pimoroni.

RPi4 with 4 GB RAM

Wrap-around case with built-in aluminium heatsink

32GB Sandisk SD card

Take it further

Are there other projects or helm charts you'd like to see in k3sup ? Raise an issue, or propose it via OpenFaaS Slack

Want to be the first to get exclusive content from my channel and open source projects? This video was released a week early for my Insiders.

Become an Insider by joining 80 other GitHub Sponsors - just pay whatever you want.

Related posts:

Tools: