OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

EKS Fargate workloads unable to resolve DNS names

  • Thread starter Thread starter David Gard
  • Start date Start date
D

David Gard

Guest
Why is a workload running EKS Fargate unable to resolve DNS names, while the same workload when run on an EC2 Node can resolve the names? In Fargate, the workload can't resolve a service running in the cluster, a DNS name in a private hosted zone, or a public DNS name.

Code:
/ $ nslookup my-api.my-namespace.svc.cluster.loca
;; connection timed out; no servers could be reached

/ $ nslookup my-record.my-domain.com
;; connection timed out; no servers could be reached

/ $ nslookup www.google.co.uk
;; connection timed out; no servers could be reached

/ $
  • The cluster is private, and the EC2 Nodes are within the same VPC subnets as the Fargate profile.
  • DNS resolution is turned on for the VPC
  • The private subnets are in a VPC that is shared with the private hosted zone.

I've looked at the AWS Fargate Considerations, and I don't believe any of them are the issue.

Is anyone able to suggest why EKS Fargate is unable to resolve DNS names?



In case it's relevant, here is an example manifest I'm using to deploy a Job that will be scheduled in Fargate.

Code:
apiVersion: batch/v1
kind: Job
metadata:
  name: test-fargate
spec:
  backoffLimit: 0
  ttlSecondsAfterFinished: 600
  template:
    spec:
      restartPolicy: Never
      containers:
        - name: test-import-aixm
          image: my-container/image:latest
          command: [ "/bin/sh", "-c", "--" ]
          args: [ "while true; do sleep 30; done;" ]
<p>Why is a workload running EKS Fargate unable to resolve DNS names, while the same workload when run on an EC2 Node can resolve the names? In Fargate, the workload can't resolve a service running in the cluster, a DNS name in a private hosted zone, or a public DNS name.</p>
<pre><code>/ $ nslookup my-api.my-namespace.svc.cluster.loca
;; connection timed out; no servers could be reached

/ $ nslookup my-record.my-domain.com
;; connection timed out; no servers could be reached

/ $ nslookup www.google.co.uk
;; connection timed out; no servers could be reached

/ $
</code></pre>
<ul>
<li>The cluster is private, and the EC2 Nodes are within the same VPC subnets as the Fargate profile.</li>
<li>DNS resolution is turned on for the VPC</li>
<li>The private subnets are in a VPC that is shared with the private hosted zone.</li>
</ul>
<p>I've looked at the <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate.html" rel="nofollow noreferrer">AWS Fargate Considerations</a>, and I don't believe any of them are the issue.</p>
<p>Is anyone able to suggest why EKS Fargate is unable to resolve DNS names?</p>
<hr />
<p>In case it's relevant, here is an example manifest I'm using to deploy a Job that will be scheduled in Fargate.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: batch/v1
kind: Job
metadata:
name: test-fargate
spec:
backoffLimit: 0
ttlSecondsAfterFinished: 600
template:
spec:
restartPolicy: Never
containers:
- name: test-import-aixm
image: my-container/image:latest
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
</code></pre>
Continue reading...
 

Latest posts

Top