RPi with K3S with Knative

RPi with K3S with Knative

August 27, 2021
Software
Tech, Kubernetes, K3S, Raspberry Pi, Knative

The process #

Use Ubuntu Server 64 bit OS #

The Rasberry Pi OS is 32 bit and wont work for Envoy which only has arm64 images available.

Install OS #

diskutil list # Get disk#
diskutil unmountDisk /dev/diskN
sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskN; sync
sudo diskutil eject /dev/rdiskN

replacing N with the disk number

Wifi #

Boot #

  • Boot the Rpi. Reboot to get it to connect to wifi
  • Setup new password

SSH #

  • Add public key to ~/.ssh/authorized_keys using ssh-copy-id

Setup for K3S #

  • Edit /boot/firmware/nobtcmd.txt (Aside: on Raspberry Pi OS its /boot/cmdline.txt)

    cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
    

    add to the end of the line and reboot.

  • Install K3S (without servicelb which interferes with Contour)

    curl -sfL https://get.k3s.io | sh -s - --disable servicelb
    
    
  • The KUBECONFIG file is available at /etc/rancher/k3s/k3s.yaml Simplify,

    ln -s /etc/rancher/k3s/k3s.yaml /root/.kube/config
    

    Copy the KUBECONFIG to your local machine - update the server IP and the “default” values “rpi”

K3S Status #

sudo systemctl status k3s

Install Knative #

Follow the steps to install the YAML Implementation

TODO: Setup Contour External access