File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,17 @@ gcloud compute instances create "${RESOURCE_NAME}" --project="${GKE_PROJECT}" --
4545
4646# Add VM IP to GKE master control node access, if required
4747if [ " ${ADD_VM_IP_AUTH_NETWORKS} " = " true" ]; then
48+ NETWORK_INTERFACES=$( gcloud compute instances describe " ${RESOURCE_NAME} " --project=" ${GKE_PROJECT} " --zone=" ${GKE_CLUSTER_ZONE} " \
49+ --format=' value(networkInterfaces)' )
50+ ACCESS_CONFIGS=$( gcloud compute instances describe " ${RESOURCE_NAME} " --project=" ${GKE_PROJECT} " --zone=" ${GKE_CLUSTER_ZONE} " \
51+ --format=' value(networkInterfaces[0].accessConfigs)' )
4852 EXTERNAL_IP=$( gcloud compute instances describe " ${RESOURCE_NAME} " --project=" ${GKE_PROJECT} " --zone=" ${GKE_CLUSTER_ZONE} " \
4953 --format=' value(networkInterfaces[0].accessConfigs[0].natIP)' )
54+
55+ echo " Network interfaces of the VM are: ${NETWORK_INTERFACES} "
56+ echo " Access configs of the VM are: ${ACCESS_CONFIGS} "
5057 echo " External IP of the VM is: ${EXTERNAL_IP} "
58+
5159 CURRENT_AUTH_NETWORK=$( gcloud container clusters describe " ${GKE_CLUSTER_NAME} " --zone=" ${GKE_CLUSTER_ZONE} " \
5260 --format=" value(masterAuthorizedNetworksConfig.cidrBlocks[0])" | sed ' s/cidrBlock=//' )
5361 echo " Current GKE master authorized networks: ${CURRENT_AUTH_NETWORK} "
You can’t perform that action at this time.
0 commit comments