10

I have set up an EKS cluster and I am trying to connect application pod to ElastiCache endpoint. I put both in same VPC and configured in/out security groups for them. Unfortunately while trying to telnet from pod to cache endpoint, it says "xxx.yyy.zzz.amazonaws.com: Unknown host". Is it even possible to make such a connection?

admly
  • 319
  • 2
  • 10
  • I haven't tried telnet, but I have successfully connected from an application pod in EKS to an ElastiCache Redis cluster in a different VPC via a [peering connection](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html). Was this with Redis or MemCached? What are were you using for the cache endpoint? Were you using the [Primary Endpoint, Reader Endpoint, or Configuration Endpoint?](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Endpoints.html) – Aposhian Oct 30 '20 at 22:46
  • I was using reader endpoint. However I didn't come up with a solution. – admly Nov 01 '20 at 10:18

2 Answers2

1

Yes, if the security groups allow connectivity then you can connect from EKS pods to Elasticache. However, be aware that the DNS name may not resolve for some time (up to around 15 minutes) after you launch the Elasticache instance/cluster.

jbg
  • 4,903
  • 1
  • 27
  • 30
1

I found an answer in the issue from cortexproject(monitoring tool based on Grafana stack).

Solved it using "addresses" instead "host" with the address of my memcached. It worked.

PS: "addresses" option isn't documented in the official documentation.

It has to view like this:

memcached_client:
  addresses: memcached.host
PRIHLOP
  • 1,441
  • 1
  • 16
  • 16