-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkurset.sh
executable file
·46 lines (39 loc) · 930 Bytes
/
kurset.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
#!/bin/bash
kurser_help() {
echo "
Command: kurset
Usage:
kurset --help # Show this help information
kurset worker # Build worker nodes
kurset # build worker node
kurset drain # delete nodes
kurset --schedule # build master node and also make it a worker node
"
exit 1
}
if [[ $1 = "worker" ]];
then
./scripts/worker.sh
elif [[ $1 = "drain" ]];
then
./scripts/drain.sh
else
case "$1" in
--schedule|-s)
./scripts/master.sh
kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl taint nodes --all node-role.kubernetes.io/control-plane-
;;
flannel)
export network=flannel
./scripts/master.sh
;;
calico)
export network=calico
./scripts/master.sh
;;
*)
kurser_help
;;
esac
fi