【问题标题】:cannot connect to Redis Instance in GCP无法连接到 GCP 中的 Redis 实例
【发布时间】:2020-04-02 22:57:49
【问题描述】:

我在 GCP 上创建了一个实例,但我无法访问它。 这与此类似,但建议的解决方案对我不起作用: Unable to telnet to GCP MemoryStore

我尝试 telnet 到它,我在同一个项目和区域,但显然我需要在同一个网络中,因为它是一个私有 ip,但是如果你想使用云 shell 连接怎么办?另外,在我的本地机器上运行的应用程序如何访问它? 我还包括了一条防火墙规则,以确保允许传入的连接。

【问题讨论】:

标签: google-cloud-platform redis google-cloud-memorystore


【解决方案1】:

这也可能与您的网络缺少对等连接有关。通过https://console.cloud.google.com/networking/peering/ 登录您的控制台,查看对等互连是否设置正确。

使用 terraform,您可以使用以下文档:https://www.terraform.io/docs/providers/google/r/redis_instance.html

【讨论】:

    【解决方案2】:
    • 要将客户端连接到 Cloud Memorystore for Redis 实例,客户端和实例必须位于同一区域、同一项目和同一 VPC 网络中。请查看“Networking” document,您将在其中获得有关基本网络设置、受限和不受支持的网络、网络对等互连、IP 地址范围的信息。

    • 您可以 connect to Redis from different GCP products 喜欢 Compute Engine VM、Google Kubernetes Engine Cluster 或 Google Kubernetes Engine pod,但您无法直接从 Cloud shell 或本地计算机连接,因为它们不在您的 VPC 网络中.

    【讨论】:

      猜你喜欢
      • 2022-07-26
      • 1970-01-01
      • 1970-01-01
      • 2021-10-11
      • 2019-07-23
      • 1970-01-01
      • 2014-07-04
      • 2021-10-20
      • 2021-04-05
      相关资源
      最近更新 更多