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,065 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,050 points
5,151 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,216 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,360 points
3,768 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
14,523 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 5,976 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,215 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
923 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