-
Notifications
You must be signed in to change notification settings - Fork 9
/
deployjob
52 lines (39 loc) · 1.17 KB
/
deployjob
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
#!/bin/bash -xv
cd zhangdongqi/stark/deployment/template
# 获取deploy状态
kubectl get deployment -n kube-system | grep stark
# 获取configmap状态
kubectl get cm -n kube-system | grep auth
# 获取pod状态
kubectl get pods -n kube-system | grep stark
# 直接编辑deployment配置,编辑之后对应的pod就会自动被调度,也可以删除deployment,然后重新根据配置文件来创建
kubectl edit deployment stark-hms-deploy -n kube-system
kubectl edit deployment stark-hub-deploy -n kube-system
# hms
kubectl delete deployment/stark-hms-deploy -n kube-system
kubectl create -f hms/hms.deploy.yaml
# hub
kubectl delete deployment/stark-hub-deploy -n kube-system
kubectl create -f hub/hub.deploy.yaml
# hook
kubectl delete deployment/stark-hook-deploy -n kube-system
kubectl create -f hook/hook.deploy.yaml
stark-hms stark-hub stark-sites
# 发布
cd ~/ke-deploy/kirk-deploy/generate/
for i in stark-redis stark-hub stark-sites; do
cd $i
for j in *; do
#kubectl apply -f $j
echo $j
done
cd ..
done
for i in stark-hub stark-sites; do
cd $i
for j in *; do
#kubectl apply -f $j
#echo $j
done
cd ..
done