mirror of https://github.com/k3s-io/k3s
set valid kubectl path for ubuntu
parent
9b60fb0c4f
commit
ba5b65ece2
|
@ -21,6 +21,7 @@ set -e
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||||
source "config-default.sh"
|
source "config-default.sh"
|
||||||
KUBECTL="${KUBE_ROOT}/cluster/kubectl.sh"
|
KUBECTL="${KUBE_ROOT}/cluster/kubectl.sh"
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
|
|
||||||
function init {
|
function init {
|
||||||
echo "Creating kube-system namespace..."
|
echo "Creating kube-system namespace..."
|
||||||
|
|
|
@ -331,6 +331,7 @@ function kube-up() {
|
||||||
done
|
done
|
||||||
wait
|
wait
|
||||||
|
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
verify-cluster
|
verify-cluster
|
||||||
detect-master
|
detect-master
|
||||||
export CONTEXT="ubuntu"
|
export CONTEXT="ubuntu"
|
||||||
|
@ -414,8 +415,8 @@ function provision-masterandnode() {
|
||||||
|
|
||||||
# Delete a kubernetes cluster
|
# Delete a kubernetes cluster
|
||||||
function kube-down {
|
function kube-down {
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
source "${KUBE_ROOT}/cluster/ubuntu/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
source "${KUBE_ROOT}/cluster/ubuntu/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
||||||
|
|
||||||
source "${KUBE_ROOT}/cluster/common.sh"
|
source "${KUBE_ROOT}/cluster/common.sh"
|
||||||
tear_down_alive_resources
|
tear_down_alive_resources
|
||||||
|
|
||||||
|
@ -464,12 +465,13 @@ function prepare-push() {
|
||||||
# Update a kubernetes master with expected release
|
# Update a kubernetes master with expected release
|
||||||
function push-master {
|
function push-master {
|
||||||
source "${KUBE_ROOT}/cluster/ubuntu/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
source "${KUBE_ROOT}/cluster/ubuntu/${KUBE_CONFIG_FILE-"config-default.sh"}"
|
||||||
|
|
||||||
if [[ ! -f "${KUBE_ROOT}/cluster/ubuntu/binaries/master/kube-apiserver" ]]; then
|
if [[ ! -f "${KUBE_ROOT}/cluster/ubuntu/binaries/master/kube-apiserver" ]]; then
|
||||||
echo "There is no required release of kubernetes, please check first"
|
echo "There is no required release of kubernetes, please check first"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
|
|
||||||
setClusterInfo
|
setClusterInfo
|
||||||
ii=0
|
ii=0
|
||||||
for i in ${nodes}; do
|
for i in ${nodes}; do
|
||||||
|
@ -512,6 +514,7 @@ function push-node() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
node_ip=${1}
|
node_ip=${1}
|
||||||
setClusterInfo
|
setClusterInfo
|
||||||
ii=0
|
ii=0
|
||||||
|
@ -555,7 +558,8 @@ function kube-push {
|
||||||
echo "There is no required release of kubernetes, please check first"
|
echo "There is no required release of kubernetes, please check first"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl"
|
||||||
#stop all the kube's process & etcd
|
#stop all the kube's process & etcd
|
||||||
ii=0
|
ii=0
|
||||||
for i in ${nodes}; do
|
for i in ${nodes}; do
|
||||||
|
|
Loading…
Reference in New Issue