gcloud compute instances describe self

I am in google cloud, in google compute engine.

I am inside an instance in a managed instance group, What is the best command for giving me the output of...

gcloud compute instances describe my-instance-group-ab12 --zone=us-central1-b

... about the current machine, without having to provide the instance name? Something similar to this concept:

gcloud compute instances describe self

I just made that command up, just to communicate what I am after.

Thank you for your help

0
задан 2 May 2018 в 17:28
1 ответ

Обычно вы можете использовать / usr / share / google / get_metadata_value , чтобы получить большую часть метаданных и создать команду оттуда, если требуется больше.

Пример:

/ usr / share / google / get_metadata_value

/ usr / share / google / get_metadata_value имя

/ usr / share / google / get_metadata_value disks /

1
ответ дан 4 December 2019 в 15:58

Теги

Похожие вопросы