fix waiting for the cluster once again
This commit is contained in:
parent
347ba42866
commit
1daa14defc
13
master.tf
13
master.tf
@ -83,12 +83,17 @@ resource "hcloud_server" "first_control_plane" {
|
|||||||
# wait for k3s to get ready
|
# wait for k3s to get ready
|
||||||
<<-EOT
|
<<-EOT
|
||||||
timeout 120 bash <<EOF
|
timeout 120 bash <<EOF
|
||||||
until [ -e /etc/rancher/k3s/k3s.yaml ]; do
|
until systemctl status k3s-server > /dev/null; do
|
||||||
echo "Waiting for kubectl config"
|
systemctl start k3s-server
|
||||||
|
echo "Initiating the cluster..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
until [[ "$(kubectl get --raw='/readyz')" == "ok" ]]; do
|
until [ -e /etc/rancher/k3s/k3s.yaml ]; do
|
||||||
echo "Waiting for cluster to become ready"
|
echo "Waiting for kubectl config..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
until [[ "\$(kubectl get --raw='/readyz')" == "ok" ]]; do
|
||||||
|
echo "Waiting for cluster to become ready..."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user