-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-script.sh
executable file
·48 lines (37 loc) · 1.16 KB
/
k8s-script.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
#!/bin/bash
# k8s 마이크로서비스 실행시키는 스크립트. 잘 안 되면 delete 주석 풀고 다시 실행
settings=("auth" "sub" "review")
for setname in ${settings[@]}
do
kubectl delete -f "${setname}-api-env.yml"
kubectl apply -f "${setname}-api-env.yml"
kubectl delete -f "${setname}-api-credentials.yml"
kubectl apply -f "${setname}-api-credentials.yml"
done
# ms settings
kubectl delete -f "ms-env.yml"
kubectl apply -f "ms-env.yml"
kubectl delete -f "ms-credentials.yml"
kubectl apply -f "ms-credentials.yml"
# db settings
kubectl delete -f "db-env.yml"
kubectl apply -f "db-env.yml"
kubectl delete -f "db-credentials.yml"
kubectl apply -f "db-credentials.yml"
dbms=("auth" "sub" "review")
for msname in ${dbms[@]}
do
kubectl delete -f "${msname}-db.yml"
kubectl apply -f "${msname}-db.yml"
kubectl delete -f "${msname}-api-deploy.yml"
kubectl apply -f "${msname}-api-deploy.yml"
done
# rabbit
kubectl delete -f "rabbitmq.yml"
kubectl apply -f "rabbitmq.yml"
ms=("bookmark" "login-logout" "main" "map" "mypage" "register" "review")
for msname in ${ms[@]}
do
kubectl delete -f "${msname}-ms-deploy.yml"
kubectl apply -f "${msname}-ms-deploy.yml"
done