-
Notifications
You must be signed in to change notification settings - Fork 0
/
k3sup.sh
executable file
·53 lines (44 loc) · 1.2 KB
/
k3sup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
echo "Setting up primary server 1"
k3sup install --host 192.168.0.48 \
--user tvl \
--cluster \
--local-path kubeconfig \
--context pi3s \
--k3s-extra-args "--disable traefik --tls-san 192.168.0.48 --tls-san 192.168.191.177 --tls-san 192.168.191.42 --tls-san 192.168.191.82 --tls-san pi3s.pangarabbit.com"
echo "Fetching the server's node-token into memory"
export NODE_TOKEN=$(k3sup node-token --host 192.168.0.48 --user tvl)
echo "Setting up additional server: 2"
k3sup join \
--host 192.168.0.107 \
--server-host 192.168.0.48 \
--server \
--node-token "$NODE_TOKEN" \
--user tvl \
--k3s-extra-args "--disable traefik"
echo "Setting up additional server: 3"
k3sup join \
--host 192.168.0.141 \
--server-host 192.168.0.48 \
--server \
--node-token "$NODE_TOKEN" \
--user tvl \
--k3s-extra-args "--disable traefik"
echo "Setting up worker: 1"
k3sup join \
--host 192.168.0.149 \
--server-host 192.168.0.48 \
--node-token "$NODE_TOKEN" \
--user tvl
echo "Setting up worker: 2"
k3sup join \
--host 192.168.0.115 \
--server-host 192.168.0.48 \
--node-token "$NODE_TOKEN" \
--user tvl
echo "Setting up worker: 3"
k3sup join \
--host 192.168.0.23 \
--server-host 192.168.0.48 \
--node-token "$NODE_TOKEN" \
--user tvl