【问题标题】:gcloud compute addresses list returns 0 results although I have external ephemeral addresses尽管我有外部临时地址,但 gcloud 计算地址列表返回 0 个结果
【发布时间】:2018-09-11 18:20:00
【问题描述】:

我的项目中有一个带有外部 IP 的谷歌计算实例。 实例上的描述命令显示:

networkInterfaces:
- accessConfigs:
  - kind: compute#accessConfig
    name: External NAT
    natIP: xx.yyy.nnn.mmm
    networkTier: PREMIUM
    type: ONE_TO_ONE_NAT
  fingerprint: hjhjhjhjh=
  kind: compute#networkInterface
  name: nic0
  network: https://www.googleapis.com/compute/v1/projects/foo-201800/global/networks/default

但是,当我在 cloudshell 上运行时。

$ gcloud config get-value project
Your active configuration is: [cloudshell-xxxx]
foo-201800

$ gcloud compute addresses list
Listed 0 items.

$ gcloud compute addresses list --global
Listed 0 items.

$ gcloud version
Google Cloud SDK 215.0.0
...snipped...

gcloud compute addresses 执行中是否不计入外部临时 IP 地址?

【问题讨论】:

    标签: google-compute-engine gcloud


    【解决方案1】:

    “gcloud 计算地址”命令仅计算项目中分配的静态 IP 地址。更具体地说,您可以在命令摘要中阅读以下说明:

    在关于计算引擎 IP 地址的document 中,关于静态 IP 外部地址和临时 IP 地址的定义如下:

    • 静态外部 IP 地址分配给项目

    • 临时外部 IP 地址可用于 VM 实例和转发规则。

    临时 IP 附加到资源而不是项目,当您使用命令“gcloud 计算地址”时,您仅列出项目中附加的 IP;静态外部 IP。

    Here你有一个例子来列出不同类型的IP地址。

    ――

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-13
      • 2018-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-15
      • 2013-11-07
      相关资源
      最近更新 更多