How to resolve AWS DNS names in Swarm?

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Hey all! I’ve been trying to connect to an Elasticache Redis cluster from a Swarm deployed to an EC2 instance. We are still in the very early stages of development, and we only have one manager node. I understand the basics of DNS resolution inside the Swarm, but I am not able to resolve Elasticache’s configuration endpoint from within the running container. If I ssh into the node, I can connect to name.id.clustercfg.region.cache.amazonaws.com with redis-cli so I know that it isn’t a security group problem. My security group also allows ingress from 2377 (tcp), 7946 (tcp and udp), and 4789 (tcp) as per documentation. From the node I can ping google.com, but if I exec into the running container I can ping 8.8.8.8 but ping google.com fails with ping: bad address ‘google.com’. I have been trying to tell Swarm to use the VPC DNS. My VPC is CIDR 10.0.0.0/16, with private subnets in 10.0.x.0/24. If I understand correctly the DNS should be at 10.0.0.2, I have added this to my docker-compose.yml but it still doesn’t seem to work. Any help here would be really appreciated, most issues I find around DNS in Swarm seem to be about service discovery, which isn’t really our case. docker-compose.yml version: ‘3.8’ services: my_service: image: ‘account.dkr.ecr.region.amazonaws.com/repo:tag’ environment: – ‘REDIS_HOST=name.id.clustercfg.region.cache.amazonaws.com’ ports: – ’80:8080′ dns: – ‘10.0.0.2’ submitted by /u/666mals [link] [comments]

X ITM Cloud News

Patricia

Leave a Reply

Next Post

How to setup Docker in Golang and Elasticsearch

Sat Aug 1 , 2020
Spread the love          I am unable to understand how to containerize my application. I have seen a bunch of tutorials, but I am unable to understand how to approach it. I am also confused when to use DOCKERFILE VS DOCKER-COMPOSE.YML. Some help would be greatly appreciated. submitted by /u/awesumsingh [link] [comments] […]
X- ITM

Cloud Computing – Consultancy – Development – Hosting – APIs – Legacy Systems

X-ITM Technology helps our customers across the entire enterprise technology stack with differentiated industry solutions. We modernize IT, optimize data architectures, and make everything secure, scalable and orchestrated across public, private and hybrid clouds.

This image has an empty alt attribute; its file name is x-itmdc.jpg

The enterprise technology stack includes ITO; Cloud and Security Services; Applications and Industry IP; Data, Analytics and Engineering Services; and Advisory.

Watch an animation of  X-ITM‘s Enterprise Technology Stack

We combine years of experience running mission-critical systems with the latest digital innovations to deliver better business outcomes and new levels of performance, competitiveness and experiences for our customers and their stakeholders.

X-ITM invests in three key drivers of growth: People, Customers and Operational Execution.

The company’s global scale, talent and innovation platforms serve 6,000 private and public-sector clients in 70 countries.

X-ITM’s extensive partner network helps drive collaboration and leverage technology independence. The company has established more than 200 industry-leading global Partner Network relationships, including 15 strategic partners: Amazon Web Services, AT&T, Dell Technologies, Google Cloud, HCL, HP, HPE, IBM, Micro Focus, Microsoft, Oracle, PwC, SAP, ServiceNow and VMware

.

X ITM