blob: a92d1ef287f9a5888ba7c28d6c7c78b5acd1726e [file] [log] [blame]
Giorgi Lekveishvilia4552a32023-07-20 10:18:07 +04001#!/bin/bash
2
3USER=root
4
Giorgi Lekveishvilif6805572023-11-22 13:52:19 +04005K3S_VERSION="v1.28.3+k3s2"
Giorgi Lekveishvilia4552a32023-07-20 10:18:07 +04006
7MASTER_INIT="192.168.100.1"
8MASTERS=("192.168.100.2" "192.168.100.3")
9WORKERS=()
10
11# --node-taint dodo=dodo:NoSchedule
12k3sup install \
13 --ssh-key ~/.ssh/id_ed25519 \
14 --k3s-channel stable \
15 --cluster \
16 --user $USER \
17 --ip $MASTER_INIT \
18 --k3s-version $K3S_VERSION \
19 --k3s-extra-args "--disable traefik --disable local-storage --disable servicelb --kube-proxy-arg proxy-mode=ipvs --kube-proxy-arg ipvs-strict-arp --flannel-backend wireguard-native"
20
21for IP in "${MASTERS[@]}";
22do
23 k3sup join \
24 --ssh-key ~/.ssh/id_ed25519 \
25 --k3s-channel stable \
26 --server \
27 --user $USER \
28 --ip $IP \
29 --server-user $USER \
30 --server-ip $MASTER_INIT \
31 --k3s-version $K3S_VERSION \
32 --k3s-extra-args "--disable traefik --disable local-storage --disable servicelb --kube-proxy-arg proxy-mode=ipvs --kube-proxy-arg ipvs-strict-arp --flannel-backend wireguard-native"
33done
34
Giorgi Lekveishvilia4552a32023-07-20 10:18:07 +040035for IP in "${WORKERS[@]}";
36do
37 k3sup join \
38 --ssh-key ~/.ssh/id_ed25519 \
39 --k3s-channel stable \
40 --ip $IP \
41 --user $USER \
42 --server-user $USER \
43 --server-ip $MASTER_INIT \
44 --k3s-version $K3S_VERSION
45done