使用专用服务访问通道且仅配置了专用 IP 或同时配置了专用 IP 和公共 IP 的 Looker (Google Cloud Core) 实例可能需要进行额外配置,才能连接到实例 VPC 网络之外的服务或资源。以下部分介绍了其他配置选项。
使用专用服务访问权限连接到其他 VPC
如需使用内部 IP 地址连接到 Google 或第三方托管的其他 VPC 中的服务,您可以使用专用服务访问通道。
在 Looker (Google Cloud Core) 实例创建期间,您创建了专用服务访问通道,以将您的 VPC 连接到 Looker (Google Cloud Core) 服务。您还可以在不中断流量的情况下更新现有专用服务访问连接的 IP 分配。
如需设置专用服务访问连接,请执行以下操作:
- 在 VPC 网络中分配内部 IP 范围。
- 使用分配的 IP 地址范围在您的 VPC 网络与服务提供方的网络之间设置专用连接。此专用连接会在您的 VPC 与其他网络之间建立 VPC 网络对等互连连接。
专用连接在您的 VPC 网络与服务提供方之间提供一对一关联。如果某个服务提供方提供多种服务,您只需一个专用连接就能获得提供方的所有服务。
使用专用服务访问通道连接到本地资源或第三方服务
如果您的实例在创建时配置为使用专用服务访问通道(仅使用专用 IP 或同时使用专用 IP 和公共 IP),您可以使用以下任一选项将 Looker (Google Cloud Core) 实例连接到本地资源或第三方服务:
- Cloud Interconnect 和 Cloud Router
- Cloud VPN,尤其是高可用性 VPN,以及 Cloud Router
无论采用哪种方法,您都需要执行以下操作:
- 在 Looker (Google Cloud Core) VPC 中为每个本地资源配置动态路由。
- 在部署在 Looker (Google Cloud Core) VPC 中的所有 Cloud Router 上,设置 Looker (Google Cloud Core) 专用服务访问子网的自定义通告路由。
- 更新您的本地防火墙,以允许与 Looker (Google Cloud Core) 子网的流量。
- 配置 DNS 转发,以便 Looker (Google Cloud Core) 连接到任何本地资源。
- 为 Looker (Google Cloud Core) 实例配置 DNS 对等互连与 Service Networking Google 托管的 VPC,以解析专用主机名。
Cloud Interconnect 和 Cloud Router
下图展示了 Cloud Interconnect 和 Cloud Router 如何与 Looker (Google Cloud Core)服务交互以连接到本地网络:
- 专用服务访问权限使用 VPC 对等互连通过内部 IP 地址将 Looker (Google Cloud Core) 服务与 VPC 连接起来。
- Cloud Router 使用边界网关协议 (BGP) 通告专用 IP 前缀,并根据从对等体收到的 BGP 通告编程动态路由。Cloud Interconnect 用于连接到本地网络。
Cloud VPN 和 Cloud Router
如需了解如何创建专用 IP 和公共 IP Looker (Google Cloud Core) 实例,并使用 Cloud VPN 和 Cloud Router 将其连接到本地数据库,请参阅 通过混合网络连接 Looker Cloud 这门 Codelab。
后续步骤
- 通过混合网络连接 Looker Cloud
- 将 Looker (Google Cloud Core) 连接到您的数据库
- 为用户准备 Looker (Google Cloud Core) 实例
- 如需查看手动安装 Looker Marketplace 内容的示例,请参阅 Looker 社区文章《在专用 IP 网络上的 Looker (Google Cloud Core) 实例上安装 Looker API Explorer》。