Added k3s

This commit is contained in:
Guillem Hernandez Sola
2026-01-30 09:44:36 +01:00
commit dd249fad69
5 changed files with 206 additions and 0 deletions

9
k3s_master.sh Normal file
View File

@@ -0,0 +1,9 @@
echo "🚀 Instal·lant K3s Server (Master)..."
curl -sfL https://get.k3s.io | sh -s - --node-ip #{IP_MASTER} --flannel-iface eth1
echo "🔑 Guardant el Token a la carpeta compartida..."
# Copiem el token a /vagrant (que és la carpeta del teu PC) perquè els workers el vegin
sudo cp /var/lib/rancher/k3s/server/node-token /vagrant/node-token
sudo chmod 644 /vagrant/node-token
echo "✅ Master llest!"