File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3838fi
3939
4040# check the cluster version and decide which version of kubectl to use:
41- SERVER_VERSION=$( kubectl version --short=true --context " ${KUBECONTEXT} " | grep -i server | cut -c18-20 | tr -d . )
42-
43- if (( "$SERVER_VERSION " <= "16 " )) ; then mv /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl; fi 2> /dev/null
41+ SERVER_VERSION=$( kubectl version --short=true --context " ${KUBECONTEXT} " | grep -i server | cut -d ' : ' -f2 | cut -d ' . ' -f2 | sed ' s/[^0-9]*//g ' )
42+ echo " Server minor version: $SERVER_VERSION "
43+ if (( "$SERVER_VERSION " <= "6 " )) ; then mv /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl; fi 2> /dev/null
4444
4545
4646[ ! -f " ${deployment_file} " ] && echo " Couldn't find $deployment_file file at $( pwd) " && exit 1;
You can’t perform that action at this time.
0 commit comments