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 in Kubernetes by Sam
• 4,330 points
56 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 by Sirajul
• 40,990 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
• 6,920 points
677 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,280 points
429 views
0 votes
1 answer
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
• 45,890 points
509 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
3,399 views
+3 votes
1 answer
0 votes
1 answer

How does Kubernetes simplify containerized application deployment process?

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

answered Jul 11 in Kubernetes by Sirajul
• 40,990 points
229 views
0 votes
1 answer