Files
inception-of-things/p1/scripts/setup-S.sh

14 lines
429 B
Bash

#!/usr/bin/env sh
S_ADDR="192.168.56.110"
echo "Launching k3s install"
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig-mode 644" sh -s - server --cluster-init --node-ip=$S_ADDR --bind-address=$S_ADDR --advertise-address=$S_ADDR
# Additional wait to ensure API is responsive (optional but helpful)
echo Waiting
sleep 15
echo "Copying token"
cat /var/lib/rancher/k3s/server/node-token > /vagrant/node-token