将 Public NAT 与 GKE 搭配使用
本页介绍如何使用 Google Kubernetes Engine (GKE) 配置示例 Public NAT 设置。在设置 Public NAT 之前,请先阅读 Public NAT 概览。
前提条件
在设置 Public NAT 之前,您需要执行以下操作。
获取 IAM 权限
通过 roles/compute.networkAdmin 角色,您有权在 Cloud Router 路由器上创建 NAT 网关、预留和分配 NAT IP 地址,以及指定哪些子网的流量应该使用 NAT 网关的网络地址转换。
设置 Google Cloud
开始之前,先在 Google Cloud中设置以下各项。
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-