This commit is contained in:
2025-02-18 19:55:29 +01:00
commit 9faf7b6fe7
4 changed files with 57 additions and 0 deletions

11
p1/scripts/agent.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
apt update
apt install -y build-essential dkms linux-headers-generic
# Get the master node's IP from the arguments
MASTER_IP=$1
# Get the token from the shared folder
TOKEN=$(cat /vagrant/token)
# Install K3s agent (worker) and join the master node
curl -sfL https://get.k3s.io | K3S_URL=https://$MASTER_IP:6443 K3S_TOKEN=$TOKEN sh -