File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ if [[ -n "${SERVER_VERSION}" ]]; then
4747 cp -f " /usr/local/bin/kubectl1.${SERVER_VERSION} " /usr/local/bin/kubectl 2> /dev/null
4848else
4949 # check the cluster version and decide which version of kubectl to use:
50- SERVER_VERSION=$( kubectl version --short=true -- context " ${KUBECONTEXT} " | grep -i server | cut -d ' :' -f2 | cut -d ' .' -f2 | sed ' s/[^0-9]*//g' )
50+ SERVER_VERSION=$( kubectl version --context " ${KUBECONTEXT} " | grep -i server | cut -d ' :' -f2 | cut -d ' .' -f2 | sed ' s/[^0-9]*//g' )
5151 echo " Server minor version: $SERVER_VERSION "
5252 if (( "$SERVER_VERSION " >= "32 " )) ; then cp -f /usr/local/bin/kubectl1.32 /usr/local/bin/kubectl; fi 2> /dev/null
5353 if (( "$SERVER_VERSION " >= "33 " )) ; then cp -f /usr/local/bin/kubectl1.33 /usr/local/bin/kubectl; fi 2> /dev/null
5757
5858# Simple testing logic for making sure override versions are set
5959if [[ -n " ${KUBE_CTL_TEST_VERSION} " ]]; then
60- KUBE_CTL_VERSION=` kubectl version --client --short `
60+ KUBE_CTL_VERSION=` kubectl version --client`
6161 echo " Testing kubectl version is set..."
6262 if [[ " ${KUBE_CTL_VERSION} " == * " ${KUBE_CTL_TEST_VERSION} " * ]]; then
6363 echo " Version correctly set"
You can’t perform that action at this time.
0 commit comments