#!/bin/sh echo "Setting up primary server 1" k3sup install --host ip1 \ --user opc \ --cluster \ --local-path kubeconfig \ --context default \ --k3s-extra-args "--disable" echo "Fetching the server's node-token into memory" export NODE_TOKEN=$(k3sup node-token --host ip1 --user opc) echo "Setting up worker: 1" k3sup join \ --host ip2 \ --server-host ip1 \ --node-token "$NODE_TOKEN" \ --user opc & echo "Setting up worker: 2" k3sup join \ --host ip3 \ --server-host ip1 \ --node-token "$NODE_TOKEN" \ --user opc & echo "Setting up worker: 3" k3sup join \ --host ip4 \ --server-host ip1 \ --node-token "$NODE_TOKEN" \ --user opc &