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.