【问题标题】:An EKS app running on fargate worker nodes is failing to connect to an elasticache redis cluster within the same subnet在 Fargate 工作程序节点上运行的 EKS 应用程序无法连接到同一子网中的 elasticache redis 集群
【发布时间】:2020-10-31 16:15:44
【问题描述】:

我有一个在 EKS (kubernetes) 集群上运行的应用程序。集群是使用 eksctl 工具创建的。我只运行fargate。该应用程序需要连接到一个 elasticache redis 集群,我在与 fargate worker 相同的子网中启动了该集群。连接错误:

{ Error: Redis connection to my-redis.kptb5s.ng.0001.use1.cache.amazonaws.com:6379 failed - connect ETIMEDOUT 192.168.116.58:6379                               │
│     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)                                                                                                               │
│   errno: 'ETIMEDOUT',                                                                                                                                                             │
│   code: 'ETIMEDOUT',                                                                                                                                                              │
│   syscall: 'connect',                                                                                                                                                             │
│   address: '192.168.116.58',                                                                                                                                                      │
│   port: 6379 }

我该如何解决这个问题?我需要让这个连接到 redis 工作。最可能的问题是什么?

【问题讨论】:

  • 你能解决这个@Johnny5 吗?

标签: network-programming amazon-vpc amazon-elasticache aws-fargate amazon-eks


【解决方案1】:

最可能的原因(基于上述)是安全组设置不允许流量从 pod 流向端口 6379 上的 redis 实例。假设与 pod 关联的 EKS 集群 SG 允许所有出站流量,我将重点关注分配给 Redis 集群端点的 SG(它需要允许来自 EKS 集群安全组的流量)。

【讨论】:

    猜你喜欢
    • 2018-04-20
    • 2020-04-27
    • 2020-04-04
    • 2020-03-31
    • 2020-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-12
    相关资源
    最近更新 更多