作者 yangfu

k8s文件修改

... ... @@ -22,6 +22,9 @@ metadata:
k8s-app: ab
spec:
replicas: 1
selector:
matchLabels:
k8s-app: ab
template:
metadata:
labels:
... ... @@ -44,7 +47,7 @@ spec:
# - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy
containers:
- name: ab
image: hub.docker.com/dk1992/ab:dev
image: registry.cn-shanghai.aliyuncs.com/tiptok/ab:master
imagePullPolicy: Always
# volumeMounts:
# - mountPath: /opt/logs
... ...
... ... @@ -2,7 +2,7 @@
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-dev get pods | grep -q ab
if [ "$?" == "1" ];then
kubectl create -f /tmp/dev/ab/opp.yaml --record
kubectl create -f /tmp/dev/ab/ab.yaml --record
kubectl -n mmm-suplus-dev get svc | grep -q ab
if [ "$?" == "0" ];then
echo "ab service install success!"
... ... @@ -16,7 +16,7 @@ if [ "$?" == "1" ];then
echo "ab deployment install fail!"
fi
else
kubectl delete -f /tmp/dev/ab/opp.yaml
kubectl delete -f /tmp/dev/ab/ab.yaml
kubectl -n mmm-suplus-dev get svc | grep -q ab
while [ "$?" == "0" ]
do
... ... @@ -27,17 +27,17 @@ else
do
kubectl -n mmm-suplus-dev get pods | grep -q ab
done
kubectl create -f /tmp/dev/ab/opp.yaml --record
kubectl create -f /tmp/dev/ab/ab.yaml --record
kubectl -n mmm-suplus-dev get svc | grep -q ab
if [ "$?" == "0" ];then
echo "ab service update success!"
else
echo "opp service update fail!"
echo "ab service update fail!"
fi
kubectl -n mmm-suplus-dev get pods | grep -q opp
kubectl -n mmm-suplus-dev get pods | grep -q ab
if [ "$?" == "0" ];then
echo "opp deployment update success!"
echo "ab deployment update success!"
else
echo "opp deployment update fail!"
echo "ab deployment update fail!"
fi
fi
\ No newline at end of file
... ...