mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Add debugging output when trying to find the name of the master.
This commit is contained in:
parent
d8a81155c8
commit
2ddc08e567
@ -386,15 +386,18 @@ function detect-nodes() {
|
||||
function detect-master() {
|
||||
detect-project
|
||||
KUBE_MASTER=${MASTER_NAME}
|
||||
echo "Trying to find master named '${MASTER_NAME}'" >&2
|
||||
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
||||
KUBE_MASTER_IP=$(gcloud compute addresses describe "${MASTER_NAME}-ip" \
|
||||
local master_address_name="${MASTER_NAME}-ip"
|
||||
echo "Looking for address '${master_address_name}'" >&2
|
||||
KUBE_MASTER_IP=$(gcloud compute addresses describe "${master_address_name}" \
|
||||
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
|
||||
fi
|
||||
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
||||
echo "Could not detect Kubernetes master node. Make sure you've launched a cluster with 'kube-up.sh'" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)"
|
||||
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)" >&2
|
||||
}
|
||||
|
||||
# Reads kube-env metadata from master
|
||||
|
Loading…
Reference in New Issue
Block a user