diff --git a/Kubernetes/K3S-Deploy/k3s.sh b/Kubernetes/K3S-Deploy/k3s.sh index b9ff68c..2319e47 100644 --- a/Kubernetes/K3S-Deploy/k3s.sh +++ b/Kubernetes/K3S-Deploy/k3s.sh @@ -117,7 +117,7 @@ k3sup install \ --tls-san $vip \ --cluster \ --k3s-version $k3sVersion \ - --k3s-extra-args "--disable traefik --disable servicelb --flannel-iface=$interface --node-ip=$master1" \ + --k3s-extra-args "--disable traefik --disable servicelb --flannel-iface=$interface --node-ip=$master1 --node-taint node-role.kubernetes.io/master=true:NoSchedule" \ --merge \ --sudo \ --local-path $HOME/.kube/config \ @@ -152,7 +152,7 @@ for newnode in "${masters[@]}"; do --server \ --server-ip $master1 \ --ssh-key $HOME/.ssh/$certName \ - --k3s-extra-args "--disable traefik --disable servicelb --flannel-iface=$interface --node-ip=$newnode" \ + --k3s-extra-args "--disable traefik --disable servicelb --flannel-iface=$interface --node-ip=$newnode --node-taint node-role.kubernetes.io/master=true:NoSchedule" \ --server-user $user echo -e " \033[32;5mMaster node joined successfully!\033[0m" done