-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstap.template.sh
executable file
·55 lines (46 loc) · 1.16 KB
/
bootstap.template.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
54
#!/bin/sh
echo "🖥️ Setting up primary server 1"
k3sup install --host 192.168.0.104 \
--k3s-extra-args '--node-taint key=value:NoSchedule' \
--user earth \
--cluster \
--local-path kubeconfig \
--context default
echo "💰 Fetching the server's node-token into memory"
export NODE_TOKEN=$(k3sup node-token --host 192.168.0.104 --user earth)
echo "🖥️ Setting up additional server: 2"
k3sup join \
--host 192.168.0.105 \
--server-host 192.168.0.104 \
--server \
--node-token "$NODE_TOKEN" \
--server-user earth \
--user earth &
echo "🤖 Setting up worker: 1"
k3sup join \
--host 192.168.0.100 \
--server-host 192.168.0.104 \
--node-token "$NODE_TOKEN" \
--server-user earth \
--user pi &
echo "🤖 Setting up worker: 2"
k3sup join \
--host 192.168.0.101 \
--server-host 192.168.0.104 \
--node-token "$NODE_TOKEN" \
--server-user earth \
--user pi &
echo "🤖 Setting up worker: 3"
k3sup join \
--host 192.168.0.102 \
--server-host 192.168.0.104 \
--node-token "$NODE_TOKEN" \
--server-user earth \
--user pi &
echo "🤖 Setting up worker: 4"
k3sup join \
--host 192.168.0.103 \
--server-host 192.168.0.104 \
--node-token "$NODE_TOKEN" \
--server-user earth \
--user pi &