Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2ec0c5

Browse files
author
Robert Bailey
committed
Merge pull request kubernetes#25166 from ixdy/automated-cherry-pick-of-#25159-upstream-release-1.0
Automated cherry pick of kubernetes#25159
2 parents e9628ca + a39147e commit c2ec0c5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cluster/gce/util.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ function detect-minions () {
266266
KUBE_MINION_IP_ADDRESSES=()
267267
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
268268
local minion_ip=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \
269-
"${MINION_NAMES[$i]}" --fields networkInterfaces[0].accessConfigs[0].natIP \
270-
--format=text | awk '{ print $2 }')
269+
"${MINION_NAMES[$i]}" --format='value(networkInterfaces[0].accessConfigs[0].natIP)')
271270
if [[ -z "${minion_ip-}" ]] ; then
272271
echo "Did not find ${MINION_NAMES[$i]}" >&2
273272
else
@@ -294,8 +293,7 @@ function detect-master () {
294293
KUBE_MASTER=${MASTER_NAME}
295294
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
296295
KUBE_MASTER_IP=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \
297-
"${MASTER_NAME}" --fields networkInterfaces[0].accessConfigs[0].natIP \
298-
--format=text | awk '{ print $2 }')
296+
"${MASTER_NAME}" --format='value(networkInterfaces[0].accessConfigs[0].natIP)')
299297
fi
300298
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
301299
echo "Could not detect Kubernetes master node. Make sure you've launched a cluster with 'kube-up.sh'" >&2

0 commit comments

Comments
 (0)