Unable to connect to ElastiCache/Redis from a Kubernetes pod in EKS
Asked Answered
H

0

6

I have a VPC in AWS. There is an EKS and an ElastiCache/Redis in this VPC. The ElastiCahce's security group has an ingress rule to allow traffic from the security group of the EKS to port 6379. The security group of the EKS has an engress rule to allow outgoing traffic to any IP with any protocol.

I am trying to connect to the ElastiCache node from a pod inside the EKS cluster using redis-cli:

redis-cli -h  my-cache-instance.xxxx.yyyy.zzzz.cache.amazonaws.com

The connection works, however if I try to run any Redis command it would fail:

my-cache-instance.xxxx.yyyy.zzzz.cache.amazonaws.com:6379> KEYS *
Error: Server closed the connection
(1.00s)

Question: How to configure ElastiCache so that it allows connecting from EKS?

Note: I am able to use redis-cli from my local machine using VPN into the VPC. The ElastiCahce's security group has an identical ingress rule to allow access from the VPN security group as the ingress rule for EKS.

Hemispheroid answered 7/12, 2021 at 15:8 Comment(3)
any updates on this ? I am having the same issueColosseum
@user2002692 if I remember correctly, in my case, there was something wrong with ingress rules of the kubernetes cluster, but I don't remember how exactly I solved thisHemispheroid
@OrioRyo I don't remember exactly how I solved it as it was tree years ago. But it was either adding an inbound or outbound ingress rule to some placeHemispheroid

© 2022 - 2024 — McMap. All rights reserved.