mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Minion->Name rename: cluster/vagrant, docs and Vagrantfile
This commit is contained in:
@@ -58,46 +58,46 @@ cd "${KUBE_ROOT}"
|
||||
|
||||
echo All verbose output will be redirected to $logfile, use --logfile option to change.
|
||||
|
||||
printf "Start the cluster with 2 minions .. "
|
||||
printf "Start the cluster with 2 nodes .. "
|
||||
export NUM_NODES=2
|
||||
export KUBERNETES_PROVIDER=vagrant
|
||||
|
||||
(cluster/kube-up.sh >>"$logfile" 2>&1) || true
|
||||
echoOK $?
|
||||
|
||||
printf "Check if minion-1 can reach kubernetes master .. "
|
||||
vagrant ssh minion-1 -- ping -c 10 kubernetes-master >>"$logfile" 2>&1
|
||||
printf "Check if node-1 can reach kubernetes master .. "
|
||||
vagrant ssh node-1 -- ping -c 10 kubernetes-master >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
printf "Check if minion-2 can reach kubernetes master .. "
|
||||
vagrant ssh minion-2 -- ping -c 10 kubernetes-master >>"$logfile" 2>&1
|
||||
printf "Check if node-2 can reach kubernetes master .. "
|
||||
vagrant ssh node-2 -- ping -c 10 kubernetes-master >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
|
||||
printf "Pull an image that runs a web server on minion-1 .. "
|
||||
vagrant ssh minion-1 -- 'sudo docker pull kubernetes/serve_hostname' >>"$logfile" 2>&1
|
||||
printf "Pull an image that runs a web server on node-1 .. "
|
||||
vagrant ssh node-1 -- 'sudo docker pull kubernetes/serve_hostname' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
printf "Pull an image that runs a web server on minion-2 .. "
|
||||
vagrant ssh minion-2 -- 'sudo docker pull kubernetes/serve_hostname' >>"$logfile" 2>&1
|
||||
printf "Pull an image that runs a web server on node-2 .. "
|
||||
vagrant ssh node-2 -- 'sudo docker pull kubernetes/serve_hostname' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
|
||||
printf "Run the server on minion-1 .. "
|
||||
vagrant ssh minion-1 -- sudo docker run -d kubernetes/serve_hostname >>"$logfile" 2>&1
|
||||
printf "Run the server on node-1 .. "
|
||||
vagrant ssh node-1 -- sudo docker run -d kubernetes/serve_hostname >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
printf "Run the server on minion-2 .. "
|
||||
vagrant ssh minion-2 -- sudo docker run -d kubernetes/serve_hostname >>"$logfile" 2>&1
|
||||
printf "Run the server on node-2 .. "
|
||||
vagrant ssh node-2 -- sudo docker run -d kubernetes/serve_hostname >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
|
||||
printf "Run ping from minion-1 to docker bridges and to the containers on both minions .. "
|
||||
vagrant ssh minion-1 -- 'ping -c 20 10.246.0.1 && ping -c 20 10.246.1.1 && ping -c 20 10.246.0.2 && ping -c 20 10.246.1.2' >>"$logfile" 2>&1
|
||||
printf "Run ping from node-1 to docker bridges and to the containers on both nodes .. "
|
||||
vagrant ssh node-1 -- 'ping -c 20 10.246.0.1 && ping -c 20 10.246.1.1 && ping -c 20 10.246.0.2 && ping -c 20 10.246.1.2' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
printf "Same pinch from minion-2 .. "
|
||||
vagrant ssh minion-2 -- 'ping -c 20 10.246.0.1 && ping -c 20 10.246.1.1 && ping -c 20 10.246.0.2 && ping -c 20 10.246.1.2' >>"$logfile" 2>&1
|
||||
printf "Same pinch from node-2 .. "
|
||||
vagrant ssh node-2 -- 'ping -c 20 10.246.0.1 && ping -c 20 10.246.1.1 && ping -c 20 10.246.0.2 && ping -c 20 10.246.1.2' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
|
||||
printf "tcp check, curl to both the running webservers from minion-1 .. "
|
||||
vagrant ssh minion-1 -- 'curl -sS 10.246.0.2:9376 && curl -sS 10.246.1.2:9376' >>"$logfile" 2>&1
|
||||
printf "tcp check, curl to both the running webservers from node-1 .. "
|
||||
vagrant ssh node-1 -- 'curl -sS 10.246.0.2:9376 && curl -sS 10.246.1.2:9376' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
printf "tcp check, curl to both the running webservers from minion-2 .. "
|
||||
vagrant ssh minion-2 -- 'curl -sS 10.246.0.2:9376 && curl -sS 10.246.1.2:9376' >>"$logfile" 2>&1
|
||||
printf "tcp check, curl to both the running webservers from node-2 .. "
|
||||
vagrant ssh node-2 -- 'curl -sS 10.246.0.2:9376 && curl -sS 10.246.1.2:9376' >>"$logfile" 2>&1
|
||||
echoOK $?
|
||||
|
||||
printf "All good, destroy the cluster .. "
|
||||
|
Reference in New Issue
Block a user