How to resolve Kubernetes DNS troubles with Amazon RDS hosts

0 votes

I have an Flask + SQLAlchemy deployed in Kubernetes, using Amazon AWS as cloud provider (Amazon EC2 machines) with a PostgreSQL RDS.

Sometimes an excetion arises when a request is performed:

psycopg2.OperationalError: could not translate host name "xxx.yyy.eu-west-1.rds.amazonaws.com" to address: Name or service not known

The Amazon RDS instance is located at the same VPC that the Kubernetes cluster, so DNS resolutions must turn into internal IP within the VPC.

I've tried to use Kubernetes kube-dns built-in stubDomains forcing to resolve *.rds.amazonaws.comDNS requests through VPC DNS resolver (in my case 10.0.0.2) but the exception keeps arising.

Does anybody have an idea of what's going wrong?

Thanks in advance.

Sep 25, 2018 in AWS by bug_seeker
• 14,980 points
169 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

I have seen that on our flannel backed cluster when the machines are under high CPU load. Also, as a for your consideration, I have never had to alter the kube-dns settings, since it will resolve .cluster.localnames, and then delegate to the EC2 resolv.conf as expected. Have you tried altering the Pod's 

answered Sep 25, 2018 by Priyaj
• 56,140 points

Related Questions In AWS

0 votes
1 answer

How to create analysis with Amazon Quicksight?

The entire process is fairly simple.  Amazon QuickSight ...READ MORE

answered Nov 14, 2018 in AWS by Archana
• 5,360 points
34 views
+1 vote
1 answer
+1 vote
2 answers
+1 vote
1 answer
0 votes
1 answer

How to copy .csv file from Amazon S3 bucket?

Boto3 is the library to use for ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 56,140 points
293 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.