if ! [ -z $KUBECTL_NAME ]; then
    if [ -x "$(command -v kubectl)" ]; then
        KUBECTL_NAME='kubectl'
    else
        KUBECTL_NAME=${KUBECTL_NAME}
    fi
    export KUBECTL_NAME
fi

KUBECTL_NAME=${KUBECTL_NAME:-}
if [ -z "$KUBECTL_NAME" ]; then
    if [ -x "$(command -v kubectl)" ]; then
        KUBECTL_NAME='kubectl'
    fi
fi
echo "Using following kubectl - ${KUBECTL_NAME}"

Set kubectl to default one if env variable is not set or empty
Set kubectl to default one if env variable is not set or empty
