2 ##############################################################################
3 # Copyright (c) 2019 Huawei Tech and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 NGINX=$(sudo docker ps | grep nginx | wc -l)
14 KUBEPROXY=$(sudo docker ps | grep k8s.gcr.io | wc -l)
18 echo "nginx container stop"
19 if [ $NGINX != $CONSTZERO ]; then
20 sudo docker kill $(docker ps -q --filter ancestor=nginx:1.15.12 )
23 echo "kubeproxy container stop"
24 if [ $KUBEPROXY != $CONSTZERO ]; then
25 sudo docker kill $(docker ps -q --filter ancestor=k8s.gcr.io/kube-proxy:v1.14.3 )