Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c0bcc04b
Commit
c0bcc04b
authored
May 04, 2016
by
Eric Paris
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25159 from ixdy/gcloud-fields-flag
Use --format='value()' instead of --fields with gcloud compute instances describe
parents
93e3df8e
6cd9dcba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
util.sh
cluster/gce/util.sh
+2
-4
No files found.
cluster/gce/util.sh
View file @
c0bcc04b
...
...
@@ -313,8 +313,7 @@ function detect-nodes () {
KUBE_NODE_IP_ADDRESSES
=()
for
((
i
=
0
;
i<
${#
NODE_NAMES
[@]
}
;
i++
))
;
do
local
node_ip
=
$(
gcloud compute instances describe
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
\
"
${
NODE_NAMES
[
$i
]
}
"
--fields
networkInterfaces[0].accessConfigs[0].natIP
\
--format
=
text |
awk
'{ print $2 }'
)
"
${
NODE_NAMES
[
$i
]
}
"
--format
=
'value(networkInterfaces[0].accessConfigs[0].natIP)'
)
if
[[
-z
"
${
node_ip
-
}
"
]]
;
then
echo
"Did not find
${
NODE_NAMES
[
$i
]
}
"
>
&2
else
...
...
@@ -341,8 +340,7 @@ function detect-master () {
KUBE_MASTER
=
${
MASTER_NAME
}
if
[[
-z
"
${
KUBE_MASTER_IP
-
}
"
]]
;
then
KUBE_MASTER_IP
=
$(
gcloud compute instances describe
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
\
"
${
MASTER_NAME
}
"
--fields
networkInterfaces[0].accessConfigs[0].natIP
\
--format
=
text |
awk
'{ print $2 }'
)
"
${
MASTER_NAME
}
"
--format
=
'value(networkInterfaces[0].accessConfigs[0].natIP)'
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment