fix: wait token created befort start k3s
This commit is contained in:
@ -3,7 +3,13 @@
|
||||
MASTER_IP=$1
|
||||
|
||||
# Get the token from the shared folder
|
||||
while [ ! -f /vagrant/token ]
|
||||
do
|
||||
sleep 2 # or less like 0.2
|
||||
done
|
||||
TOKEN=$(cat /vagrant/token)
|
||||
echo "token: $TOKEN"
|
||||
|
||||
# Install K3s agent (worker) and join the master node
|
||||
curl -sfL https://get.k3s.io | K3S_URL=https://$MASTER_IP:6443 K3S_TOKEN=$TOKEN sh -
|
||||
rm -f /vagrant/token
|
||||
|
Reference in New Issue
Block a user