Skip to content

Instantly share code, notes, and snippets.

@ollytheninja
Created May 9, 2022 05:06
Show Gist options
  • Save ollytheninja/de9e5e78a5256b7f0e2504ce6734c9e0 to your computer and use it in GitHub Desktop.
Save ollytheninja/de9e5e78a5256b7f0e2504ce6734c9e0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Install relevant dependencies for NFS / Longhorn
sudo apt install nfs-common open-iscsi
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="---options---" sh -
Options:
--disable traefik
--disable servicelb
--data-dir /mnt/ssd/k3s
--kube-apiserver-arg 'enable-admission-plugins\=NodeRestriction,PodSecurityPolicy,ServiceAccount'
# aaand if you want to join another server...
# node token is in this path on the master node
cat /var/lib/rancher/k3s/server/node-token
NODE_TOKEN=...from above...
curl -sfL https://get.k3s.io | K3S_URL=https://osb.fantail.network:6443 K3S_TOKEN=$NODE_TOKEN sh -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment