mirror of
https://github.com/jbowdre/vsphere-k8s.git
synced 2024-11-21 15:42:19 +00:00
use python http server to see discovery.yaml
This commit is contained in:
parent
beb7a2feca
commit
b93e07740d
2 changed files with 5 additions and 2 deletions
|
@ -64,6 +64,8 @@ EOF
|
|||
fi
|
||||
fi
|
||||
echo ">> Waiting up to 15 minutes for all nodes to be Ready..."
|
||||
python3 -m http.server &
|
||||
PROC_ID=$!
|
||||
attempts_max=90
|
||||
attempt=0
|
||||
until [ "$(kubectl get nodes | grep -c ' Ready ')" == "${K8S_NODE_COUNT}" ]; do
|
||||
|
@ -74,6 +76,7 @@ EOF
|
|||
attempt=$((attempt+1))
|
||||
sleep 10
|
||||
done
|
||||
kill $PROC_ID
|
||||
echo ">> Continuing after $((attempt*10)) seconds."
|
||||
echo ">> Configuring vSphere Cloud Provider Interface..."
|
||||
cat << EOF | kubectl apply -f -
|
||||
|
@ -371,7 +374,7 @@ else
|
|||
attempts_max=6
|
||||
attempt=0
|
||||
until [ -f /etc/kubernetes/discovery.yaml ]; do
|
||||
scp -o StrictHostKeyChecking=no "${K8S_CONTROLPLANE_VIP}":discovery.yaml . 2>/dev/null
|
||||
wget "http://${K8S_CONTROLPLANE_VIP}:8000/discovery.yaml" 2>/dev/null
|
||||
sudo install -o root -g root -m 600 discovery.yaml /etc/kubernetes/discovery.yaml 2>/dev/null
|
||||
if [ ! -f /etc/kubernetes/discovery.yaml ]; then
|
||||
attempt=$((attempt+1))
|
||||
|
|
|
@ -30,7 +30,7 @@ echo ">> Joining cluster..."
|
|||
attempts_max=6
|
||||
attempt=0
|
||||
until [ -f /etc/kubernetes/discovery.yaml ]; do
|
||||
scp -o StrictHostKeyChecking=no "${K8S_CONTROLPLANE_VIP}":discovery.yaml . 2>/dev/null
|
||||
wget "http://${K8S_CONTROLPLANE_VIP}:8000/discovery.yaml" 2>/dev/null
|
||||
sudo install -o root -g root -m 600 discovery.yaml /etc/kubernetes/discovery.yaml 2>/dev/null
|
||||
if [ ! -f /etc/kubernetes/discovery.yaml ]; then
|
||||
attempt=$((attempt+1))
|
||||
|
|
Loading…
Reference in a new issue