Skip to content

Instantly share code, notes, and snippets.

@gintsgints
Last active February 29, 2020 10:59
Show Gist options
  • Save gintsgints/769c3c9822e0b4951f6bc9eb83eae221 to your computer and use it in GitHub Desktop.
Save gintsgints/769c3c9822e0b4951f6bc9eb83eae221 to your computer and use it in GitHub Desktop.

NanoPI install

Use instructions - https://gist.github.com/gintsgints/8d049cf122c1f2e49c5805dbce0d4653

Update system

# Update packages first
sudo apt-get update
sudo apt-get upgrade -y

Install needed utlities

apt-get install curl

Install all nodes at /etc/hosts

192.168.0.151 node1
192.168.0.152 node2
192.168.0.155 node3

Setup k3s master

curl -sfL https://get.k3s.io | sh -
# Check for Ready node, 
takes maybe 30 seconds
sudo k3s kubectl get node
# get token for nodes
sudo cat /var/lib/rancher/k3s/server/node-token

Connect nodes

Get latest binary

https://github.com/rancher/k3s/releases/latest

wget https://github.com/rancher/k3s/releases/download/v1.17.3%2Bk3s1/k3s-arm64
mv k3s-arm64 k3s
chmod +x k3s
sudo mv k3s /usr/local/bin/k3s
# connect to master
sudo k3s agent --server https://master:6443 --token ${NODE_TOKEN}

Uninstall

To uninstall, as su user execute uinstall script:

/usr/local/bin/k3s-uninstall.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment