在 Google Compute Engine 上移除或释放静态 IP

Removing or releasing a static IP on Google Compute Engine

我正在尝试 remove/delete 一个我不再使用的静态 IP 地址,并且看不到执行此操作的方法。我能从文档中得到的最接近的是 this page 上面写着:

When an instance is stopped, you can still perform actions that can affect the stopped instance, such as:

  • [...]
  • Removing or setting a new static IP

P.S。感谢您为我指明正确的方向。如果有人想快速了解如何执行此操作,请参阅 a short video 了解如何以及为什么释放未使用的 IP 是一个好习惯。希望对您有所帮助。

根据 Google Cloud networking docs:

Release a static external IP address

gcloud compute addresses delete ADDRESS --project PROJECT --region REGION

您也可以通过 Web 界面完成。在左侧菜单中,转到 "Networking",然后 "External IP Addresses"。

您可以从那里管理您当前的项目 IP。

Link to Google group thread I found this info on

我不能评论,所以我会在这里回答:

  1. 您需要指明您是在谈论外部 IP 地址还是内部 IP 地址。该方法因用例而异。

  2. 另外:解决方案只包括外部 IP 地址。

为了完整起见(并不是每个人都有快速的视频互联网),这里是第二个用例:

对于静态内部 IP 地址,您需要进入 VM 实例并释放静态绑定以再次使 IP 短暂。该 IP 仍将被使用,但在重新启动后它会回到临时地址池​​中。但是,可能会偶然附加相同的 IP。

关于此特定案例的知识库文章是 here

The main article for external static IPs

The main article for internal static IPs