From 7d2b9b34cb448cbfe7ffba3dc5749828b20bdc05 Mon Sep 17 00:00:00 2001 From: James Turland Date: Mon, 4 Dec 2023 09:57:38 +0000 Subject: [PATCH] update --- Kubernetes/K3S-Deploy/k3s-test-do-not-use.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kubernetes/K3S-Deploy/k3s-test-do-not-use.sh b/Kubernetes/K3S-Deploy/k3s-test-do-not-use.sh index d99e45c..b9ff68c 100644 --- a/Kubernetes/K3S-Deploy/k3s-test-do-not-use.sh +++ b/Kubernetes/K3S-Deploy/k3s-test-do-not-use.sh @@ -142,7 +142,7 @@ ssh $user@$master1 -i ~/.ssh/$certName <<- EOF sudo mv kube-vip.yaml /var/lib/rancher/k3s/server/manifests/kube-vip.yaml EOF -# Step 6: Add new master nodes (servers) +# Step 6: Add new master nodes (servers) & workers for newnode in "${masters[@]}"; do k3sup join \ --ip $newnode \ @@ -157,6 +157,7 @@ for newnode in "${masters[@]}"; do echo -e " \033[32;5mMaster node joined successfully!\033[0m" done +# add workers for newagent in "${workers[@]}"; do k3sup join \ --ip $newagent \ @@ -164,7 +165,8 @@ for newagent in "${workers[@]}"; do --sudo \ --k3s-version $k3sVersion \ --server-ip $master1 \ - --ssh-key $HOME/.ssh/$certName + --ssh-key $HOME/.ssh/$certName \ + --k3s-extra-args "--node-label \"longhorn=true\" --node-label \"worker=true\"" echo -e " \033[32;5mAgent node joined successfully!\033[0m" done