File tree Expand file tree Collapse file tree
src/kubectl-helm-minikube Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,16 +154,16 @@ if [ ${KUBECTL_VERSION} != "none" ]; then
154154 # Install the kubectl, verify checksum
155155 echo " Downloading kubectl..."
156156 if [ " ${KUBECTL_VERSION} " = " latest" ] || [ " ${KUBECTL_VERSION} " = " lts" ] || [ " ${KUBECTL_VERSION} " = " current" ] || [ " ${KUBECTL_VERSION} " = " stable" ]; then
157- KUBECTL_VERSION=" $( curl -fsSL --connect-timeout 10 --max-time 30 https://dl.k8s.io/release/stable.txt 2> /dev/null || echo " " ) "
157+ KUBECTL_VERSION=" $( curl -fsSL --connect-timeout 10 --max-time 30 https://dl.k8s.io/release/stable.txt 2>&1 | grep -E ' ^v[0-9]+\.[0-9]+\.[0-9]+ ' || echo " " ) "
158158 if [ -z " ${KUBECTL_VERSION} " ]; then
159- echo " (!) Failed to fetch kubectl stable version, falling back to version discovery via git tags"
159+ echo " (!) Failed to fetch kubectl stable version from dl.k8s.io , falling back to version discovery via git tags"
160160 find_version_from_git_tags KUBECTL_VERSION https://github.com/kubernetes/kubernetes
161161 fi
162162 else
163163 find_version_from_git_tags KUBECTL_VERSION https://github.com/kubernetes/kubernetes
164164 fi
165165 if [ -z " ${KUBECTL_VERSION} " ] || [ " ${KUBECTL_VERSION} " = " none" ]; then
166- echo " (!) Failed to determine kubectl version"
166+ echo " (!) Failed to determine kubectl version. Check network connectivity or specify an explicit version. "
167167 exit 1
168168 fi
169169 if [ " ${KUBECTL_VERSION:: 1} " != ' v' ]; then
You can’t perform that action at this time.
0 commit comments