diff --git a/scripts/retrieve_kubeconfig.sh b/scripts/retrieve_kubeconfig.sh index 71bce6e..8586f40 100755 --- a/scripts/retrieve_kubeconfig.sh +++ b/scripts/retrieve_kubeconfig.sh @@ -3,7 +3,10 @@ CONTROLLER_IP=$1 KEY_PATH=$2 -/bin/sleep 180 ; \ +while ! /usr/bin/ssh -i $KEY_PATH \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null -q \ + root@$CONTROLLER_IP "ls /etc/rancher/k3s/k3s.yaml" &> /dev/null; do sleep 1; done && \ if [[ "$OSTYPE" == "darwin"* ]]; then CONFIG=$(/usr/bin/ssh -i \ $KEY_PATH \