Skip to content

Instantly share code, notes, and snippets.

@alanbchristie
Last active May 25, 2022 08:15
Show Gist options
  • Save alanbchristie/b161c0b5047b1b89935a1fe54b6cdadd to your computer and use it in GitHub Desktop.
Save alanbchristie/b161c0b5047b1b89935a1fe54b6cdadd to your computer and use it in GitHub Desktop.
Raspberry Pi OS - installing k3s
# You'll need to patch the Pi's `/boot/cmdline.txt`
# by adding `cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1`
# to the end of the existing line (see https://github.com/k3s-io/k3s/issues/2067)
#
# i.e. `/boot/cmdline.txt` should look like something like this: -
console=serial0,115200 console=tty1 root=PARTUUID=b9075e12-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
# Reboot and you should be able to install k3s
# and its agents: -
#
# See https://rancher.com/docs/k3s/latest/en/quick-start/
##############
# k3s master #
##############
curl -sfL https://get.k3s.io | sh -
#############
# k3s agent #
#############
# You can get the master token from the node-token file on the master: -
# sudo cat /var/lib/rancher/k3s/server/node-token
#
# Assuming `TOKEN` is set and `192.168.0.10` is the IP address of your master
# install a specific k3s release with the following...
export K3S_URL=https://192.168.0.10:6443
export K3S_TOKEN=${TOKEN}
export INSTALL_K3S_VERSION=v1.23.6+k3s1
curl -sfL https://get.k3s.io | sh -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment