作者 Administrator

增加新文件

#!/bin/bash
export PATH=/root/local/bin:$PATH
kubectl -n mmm-suplus-prd get pods | grep -q performance-back
if [ "$?" == "1" ];then
kubectl create -f /tmp/prd/performance-back/performance-back.yaml --record
kubectl -n mmm-suplus-prd get svc | grep -q performance-back
if [ "$?" == "0" ];then
echo "performance-back service install success!"
else
echo "performance-back service install fail!"
fi
kubectl -n mmm-suplus-prd get pods | grep -q performance-back
if [ "$?" == "0" ];then
echo "performance-back deployment install success!"
else
echo "performance-back deployment install fail!"
fi
else
kubectl delete -f /tmp/prd/performance-back/performance-back.yaml
kubectl -n mmm-suplus-prd get svc | grep -q performance-back
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-prd get svc | grep -q performance-back
done
kubectl -n mmm-suplus-prd get pods | grep -q performance-back
while [ "$?" == "0" ]
do
kubectl -n mmm-suplus-prd get pods | grep -q performance-back
done
kubectl create -f /tmp/prd/performance-back/performance-back.yaml --record
kubectl -n mmm-suplus-prd get svc | grep -q performance-back
if [ "$?" == "0" ];then
echo "performance-back service update success!"
else
echo "performance-back service update fail!"
fi
kubectl -n mmm-suplus-prd get pods | grep -q performance-back
if [ "$?" == "0" ];then
echo "performance-back deployment update success!"
else
echo "performance-back deployment update fail!"
fi
fi
\ No newline at end of file
... ...