This commit is contained in:
alessandro
2026-07-17 09:42:52 +02:00
commit 20d506407a
93 changed files with 14526 additions and 0 deletions

29
worker-installa_rke2.sh Normal file
View File

@@ -0,0 +1,29 @@
# Install RKE2 agent
curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sudo sh -
# Create configuration
sudo mkdir -p /etc/rancher/rke2
# Worker configuration - connects through the load balancer!
sudo tee /etc/rancher/rke2/config.yaml > /dev/null << EOF
# RKE2 Agent Configuration
server: https://POC-Kube-Balancer:9345 # Using the main load balancer!
token: "K10b8b252de84e5aab8bc1d2a8e4aad3e329ee84d638892b8638de0260b7cb8212a::server:34b189ab7b91fc924500ba0b3608b80b"
# Node labels for workload scheduling
node-label:
- "node.kubernetes.io/worker=true"
- "workload-type=general"
# Optional: Reserve resources for system stability
# kubelet-arg:
# - "system-reserved=cpu=500m,memory=1Gi"
# - "kube-reserved=cpu=500m,memory=1Gi"
EOF
# Start the worker
sudo systemctl enable rke2-agent.service
sudo systemctl start rke2-agent.service
# Check status
sudo systemctl status rke2-agent.service