Update longhorn-K3S.sh

This commit is contained in:
tehNooB 2023-11-02 11:00:02 +00:00 committed by GitHub
parent b6b9b0e20b
commit 8f8bea877c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,6 +39,9 @@ vip=192.168.3.50
# Array of longhorn nodes # Array of longhorn nodes
storage=($longhorn1 $longhorn2 $longhorn3) storage=($longhorn1 $longhorn2 $longhorn3)
#ssh certificate name variable
certName=id_rsa
############################################# #############################################
# DO NOT EDIT BELOW # # DO NOT EDIT BELOW #
############################################# #############################################
@ -69,7 +72,7 @@ for newnode in "${storage[@]}"; do
--k3s-channel stable \ --k3s-channel stable \
--server-ip $master1 \ --server-ip $master1 \
--k3s-extra-args "--node-label \"longhorn=true\"" \ --k3s-extra-args "--node-label \"longhorn=true\"" \
--ssh-key $HOME/.ssh/id_rsa --ssh-key $HOME/.ssh/$certName
echo -e " \033[32;5mAgent node joined successfully!\033[0m" echo -e " \033[32;5mAgent node joined successfully!\033[0m"
done done