mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Merge pull request #5557 from jayunit100/vagrant-fix-1
Fix vagrant so that ssh commands work OOTB
This commit is contained in:
commit
ac3b1b255f
@ -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
|
||||
|
@ -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:"
|
||||
|
Loading…
Reference in New Issue
Block a user