Raspberry Pi 4 Install K3S

Raspberry Pi 4 Install K3S

# 
# Raspberry Pi 4 (4G RAM) Install K3S (https://k3s.io)
#
# OS: Raspbian Buster Lite 2019-09-26 (https://www.raspberrypi.org/downloads/)
# 
# 192.168.8.34 node4/master
# 192.168.8.33 node3
# 192.168.8.32 node2
# 192.168.8.31 node1
#

# node4/3/2/1
sudo apt update && sudo apt upgrade -y
sudo hostnamectl set-hostname node4...1
sudo reboot

curl -fsSL download.docker.com/linux/raspbian/gpg | sudo apt-key add -
curl -sSL get.docker.com | sudo sh
sudo usermod -aG docker pi

# node4/master
curl -sfL get.k3s.io | sudo sh -s - server --docker

sudo cat /var/lib/rancher/k3s/server/node-token
K10499d6670db66d9850b7343c84fd155c4badf0be2fb1b618ad88ea92d7cfd1f3e::server:55c1cc058094401ee4557176e54c30f6

# node3/2/1
curl -sfL get.k3s.io | INSTALL_K3S_EXEC="agent --docker" \
K3S_TOKEN=K10499d6670db66d9850b7343c84fd155c4badf0be2fb1b618ad88ea92d7cfd1f3e::server:55c1cc058094401ee4557176e54c30f6 \
K3S_URL=https://192.168.8.34:6443 sh -

# node4/master
curl -sSL raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | sudo sh
helm repo add bitnami https://charts.bitnami.com/bitnami
ln -s /etc/rancher/k3s/k3s.yaml $HOME/.kube/config

你可能感兴趣的:(Iot)