Add timeout to kubectl get node
[iec.git] / src / foundation / scripts / k8s_master.sh
index 67eecf5..5cce155 100755 (executable)
@@ -13,7 +13,7 @@ if [ -z "${MGMT_IP}" ]; then
   exit 1
 fi
 
-if ! kubectl get nodes; then
+if ! kubectl get nodes --request-timeout=3s; then
   sudo kubeadm config images pull
   sudo kubeadm init \
     --pod-network-cidr="${POD_NETWORK_CIDR}" \