如何创建没有外部 IP 地址的 Compute Engine 实例?

How do I create a Compute Engine instance with no external IP address?

我一直在按照指南使用 Cloud NAT 创建和计算引擎实例。

按照找到的指南执行第 5 步创建 Compute Engine 实例后 here,我发现我可以通过 SSH 连接到我的实例并访问互联网,这不是我所期望的。

在同一步骤中,有一个 link 导致解决此问题 here。列出的首要问题是该实例具有外部 IP 地址,尽管说明明确(第 2 步)说将该选项设置为 "None."

我回到 Compute Engine UI 以创建一个新实例来三次检查此选项是否设置为 "None" like this. After clicking "Done" and clicking "Create" on the instance, the UI shows what I would expect like this with an external IP of None. Yet, after finishing the creation process, I get something like this,它无论如何都有一个指定的外部 IP 地址。

有没有人运行以前处理过这个问题?我是否遗漏了指定外部 IP 地址的步骤?

谢谢!

项目似乎发生了一些奇怪的事情。您能否尝试完全使用 gcloud command instead of the console and make sure you remove the accessConfigs member 创建一个 VM,以创建一个没有外部 IP 的 VM。

此外,在检查您共享的屏幕截图时,您似乎正在使用自定义 VPC,能否请您尝试 create VM with default VPC and set-up NAT 使用它。