cluster/gce: fix unset variable when insecure port is enabled

k3s-v1.15.3
Mike Danese 2019-05-16 19:47:11 -07:00
parent 8ae998ceb6
commit 4edec1f3be
1 changed files with 1 additions and 1 deletions

View File

@ -2847,7 +2847,7 @@ function wait-till-apiserver-ready() {
function ensure-bootstrap-kubectl-auth {
# Creating an authenticated kubeconfig is only necessary if the insecure port is disabled.
if [[ -n "${KUBE_BOOTSTRAP_TOKEN}" ]]; then
if [[ -n "${KUBE_BOOTSTRAP_TOKEN:-}" ]]; then
create-kubeconfig "cluster-bootstrap" ${KUBE_BOOTSTRAP_TOKEN}
export KUBECONFIG=/etc/srv/kubernetes/cluster-bootstrap/kubeconfig
fi