Change:
} # Instantiate a kubernetes cluster <del> function kube-up { vagrant up </del> <ins> function kube-up { get-password vagrant up echo "Each machine instance has been created." echo "  Now waiting for the Salt provisioning process to complete on each machine." echo "  This can take some time based on your network, disk, and cpu speed." echo "  It is possible for an error to occur during Salt provision of cluster and this could loop forever." # verify master has all required daemons echo "Validating master" MACHINE="master" REQUIRED_DAEMON=("salt-master" "salt-minion" "apiserver" "nginx" "controller-manager" "scheduler") VALIDATED="1" until [ "$VALIDATED" -eq "0" ]; do VALIDATED="0" for daemon in ${REQUIRED_DAEMON[@]}; do vagrant ssh $MACHINE -c "which $daemon" >/dev/null 2>&1 || { printf "."; VALIDATED="1"; sleep 2; } done done # verify each minion has all required daemons for (( i=0; i<${#MINION_NAMES[@]}; i++)); do echo "Validating ${VAGRANT_MINION_NAMES[$i]}" MACHINE=${VAGRANT_MINION_NAMES[$i]} REQUIRED_DAEMON=("salt-minion" "kubelet" "docker") VALIDATED="1" until [ "$VALIDATED" -eq "0" ]; do VALIDATED="0" for daemon in ${REQUIRED_DAEMON[@]}; do vagrant ssh $MACHINE -c "which $daemon" >/dev/null 2>&1 || { printf "."; VALIDATED="1"; sleep 2; } done done done echo echo "Waiting for each minion to be registered with cloud provider" for (( i=0; i<${#MINION_NAMES[@]}; i++)); do COUNT="0" until [ "$COUNT" -eq "1" ]; do $(dirname $0)/kubecfg.sh -template '{{range.Items}}{{.ID}}:{{end}}' list minions > /tmp/minions COUNT=$(grep -c ${MINION_NAMES[i]} /tmp/minions) || { printf "."; sleep 2; COUNT="0"; } done done echo echo "Kubernetes cluster created." echo echo "Kubernetes cluster is running.  Access the master at:" echo echo "  https://${user}:${passwd}@${KUBE_MASTER_IP}" </ins> } # Delete a kubernetes cluster function kube-down { <del> vagrant destroy -f </del> <ins> vagrant destroy -f </ins> } # Update a kubernetes cluster with latest source function kube-push { <del> vagrant provision </del> <ins> vagrant provision </ins> } # Execute prior to running tests to build a release if required for env function test-build-release { <del> echo "Vagrant provider can skip release build" </del> <ins> echo "Vagrant provider can skip release build" </ins> } # Execute prior to running tests to initialize required structure function test-setup { <del> echo "Vagrant test setup complete" </del> <ins> echo "Vagrant test setup complete" </ins> } # Execute after running tests to perform any required clean-up function test-teardown { <del> echo "Vagrant ignores tear-down" </del> <ins> echo "Vagrant ignores tear-down" </ins> } # Set the {user} and {password} environment values required to interact with provider function get-password { <del> export user=vagrant export passwd=vagrant echo "Using credentials: $user:$passwd" </del> <ins> export user=vagrant export passwd=vagrant echo "Using credentials: $user:$passwd" </ins> }

Discussion:
Running vagrant from scratch gives the error: For vagrant cluster, the last minion cannot be detected. The /tmp/minions file only shows two minions, but after a while, using the same command, i.e. will get three minions. There is a race between kube-up and validate-, we should wait a while before panic.
I can look to fix this.