Merge pull request #5557 from jayunit100/vagrant-fix-1

Fix vagrant so that ssh commands work OOTB
This commit is contained in:
Derek Carr 2015-03-18 15:04:51 -04:00
commit ac3b1b255f
2 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
echo "Adding $minion to hosts file"
echo "$ip $minion" >> /etc/hosts
fi
echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master.
done
# Update salt configuration

View File

@ -174,6 +174,12 @@ function verify-cluster {
done
done
# By this time, all kube api calls should work, so no need to loop and retry.
echo "Validating we can run kubectl commands."
vagrant ssh master --command "kubectl get pods" || {
echo "WARNING: kubectl to localhost failed. This could mean localhost is not bound to an IP"
}
(
echo
echo "Kubernetes cluster is running. The master is running at:"