

bhjjkfqfzj
rwqtYL77

HTYDsyq147@

192.168.1.243 120.222.186.143 ZLM
192.168.1.128,120.222.186.222 MASTER NGINX


192.168.1.128

host_list=(
  172.20.24.19
  172.20.24.3
  172.20.24.4
  172.20.24.15
  172.20.24.2
  172.20.24.10
  172.20.24.8
  172.20.24.14
  172.20.24.27
)

DEFAULT_HTTP_BACKEND_IP=$(kubectl -n ingress-nginx get svc default-http-backend -o jsonpath='{.spec.clusterIP}')

for server in "${host_list[@]}"; do
   echo "===== current ip is $server ====="
   ssh root@"$server" "DEFAULT_HTTP_BACKEND_IP='$DEFAULT_HTTP_BACKEND_IP' bash -s" <<'EOF'
   echo "DEFAULT_HTTP_BACKEND_IP=$DEFAULT_HTTP_BACKEND_IP"

   curl -s "http://${DEFAULT_HTTP_BACKEND_IP}"
   echo
EOF
   echo ""
done