Files
Bash_Scrips/scripts/tools/drain_host.sh
2025-06-23 21:19:51 +02:00

15 lines
240 B
Bash

#!/bin/bash
OS_MASTER=$1
HOSTS=($(cat $2))
if [ $# -lt 1 ]
then
echo "Syntax: ./$(basename $0)<OpenShift master node> <file name>"
exit
fi
for host in "${HOSTS[@]}"
do
ssh -n root@$1 "oc adm drain --ignore-daemonsets $host"
done