Added scripts macos

This commit is contained in:
2026-02-24 11:32:42 +01:00
parent 61a93e4e6b
commit e7a5a9306b
3 changed files with 29 additions and 15 deletions

View File

@@ -1,8 +1,21 @@
#Anem a buscar el node token al Master
#sudo cat /var/lib/rancher/k3s/server/node-token
#K3S_TOKEN=algun_string_random::server:segon_string_random
# Aquest script s'ha de fer servir amb el node agent ja provisionat
# Anem a buscar el node token al Master
# sudo cat /var/lib/rancher/k3s/server/node-token
# Això dóna un string com algun_string_random::server:segon_string_random
# NOTA: Executar les següents comandes als nodes que voleu que siguin workers
# K3S_TOKEN=algun_string_random::server:segon_string_random
# Quan ja tinguem els nodes preparats i penjats
# Recordar que 192.168.3.10 és la IP del controlplane
echo "🚀 Instal·lant K3s Agent (Worker) connectant a 192.168.3.10..."
echo "🚀 Instal·lant K3s Agent (Worker) connectant a #{IP_MASTER}..."
curl -sfL https://get.k3s.io | K3S_URL=https://192.168.3.10:6443 K3S_TOKEN=$K3S_TOKEN sh -
echo "✅ Worker unit al clúster!"
echo "✅ Worker unit al clúster!"
#Executar això al Controplane, per tenir-los amb role de worker
#kubectl label node worker-node01 node-role.kubernetes.io/worker=worker
#kubectl label node worker-node02 node-role.kubernetes.io/worker=worker
#Desactivar que al node controlplane es puguin executar pods
#kubectl taint nodes controlplane node-role.kubernetes.io/master=true:NoSchedule