How does DNS work in kubernetes

0 votes
I was just experimenting with kubernetes since a couple of days.Can anybody explain how DNS works in kubernetes?
Jul 12, 2019 in Kubernetes by Sam
• 6,260 points
1,455 views

1 answer to this question.

0 votes

DNS is a built-in service in Kubernetes. It gets  launched automatically when Kubernetes is setup for the first time. 

Kubernetes Domain Name Server schedules a DNS Pod and Service on the cluster, and setup the kubelets to inform individual containers to use the DNS Service’s IP to resolve DNS names. 

Every Service which gets defined in the Kubernetes cluster (including the DNS server itself) is assigned with a DNS name. 

By default, a client Pod’s DNS search list will include the Pod’s own namespace and the cluster’s default domain. 

For Example: if we have a Service named serve1 in the Kubernetes namespace ns1

A Pod running in namespace ns1 can look up this service by simply doing a DNS query for serve1. A Pod running in namespace collab can look up this service by doing a DNS query for serve1.ns1.

answered Jul 12, 2019 by Sirajul
• 59,230 points

Related Questions In Kubernetes

0 votes
2 answers

DNS does not resolve with NGINX in Kubernetes

adding to @kalgi's answer Using just the hostname ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 7,060 points
5,660 views
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,300 points
2,497 views
0 votes
1 answer

Error saying "The specified bucket does not exist" in kubernetes

Bucket is created in another region. Looks like ...READ MORE

answered Aug 31, 2018 in Kubernetes by Kalgi
• 52,350 points
4,134 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,576 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
0 votes
1 answer

How does Kubernetes simplify containerized application deployment process?

A application deployment requires , web tier ...READ MORE

answered Jul 11, 2019 in Kubernetes by Sirajul
• 59,230 points
1,632 views
0 votes
1 answer

How to build a high availability cluster in Kubernetes?

Add nodes in a HA cluster in ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
1,246 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP