mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
Update gce starting guide to use get.k8s.io
Also auto install gcloud if it's not present.
This commit is contained in:
@@ -28,12 +28,23 @@ NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion"
|
||||
function verify-prereqs {
|
||||
local cmd
|
||||
for cmd in gcloud gsutil; do
|
||||
which "${cmd}" >/dev/null || {
|
||||
echo "Can't find ${cmd} in PATH, please fix and retry. The Google Cloud "
|
||||
echo "SDK can be downloaded from https://cloud.google.com/sdk/."
|
||||
exit 1
|
||||
}
|
||||
if ! which "${cmd}" >/dev/null; then
|
||||
echo "Can't find ${cmd} in PATH. Do you wish to install the Google Cloud SDK? [Y/n]"
|
||||
local resp
|
||||
read resp
|
||||
if [[ "${resp}" != "n" && "${resp}" != "N" ]]; then
|
||||
curl https://sdk.cloud.google.com | bash
|
||||
fi
|
||||
if ! which "${cmd}" >/dev/null; then
|
||||
echo "Can't find ${cmd} in PATH, please fix and retry. The Google Cloud "
|
||||
echo "SDK can be downloaded from https://cloud.google.com/sdk/."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# update and install components as needed
|
||||
gcloud components update preview
|
||||
gcloud components update
|
||||
}
|
||||
|
||||
# Create a temp dir that'll be deleted at the end of this bash session.
|
||||
|
Reference in New Issue
Block a user