Core DNS in Kubernetes - Simplified Learning
Core DNS in Kubernetes - Simplified Learning
Search
Us
Ads by
Introduction
Core DNS in Kubernetes 01 JUL - 04 SEPT
Core Concepts DON'T MISS
Stop seeing
ad
this
In this tutorial, we are going to discuss about OUT ON
Scheduling DUBAI
Why this ad?
Core DNS in Kubernetes and how Kubernetes SUMMER
Monitoring
implements in the cluster. SURPRISES
25TH
Application EDITION!
Lifecycle In the previous tutorial we saw how you can
Management address a service or POD from another POD.
Kubernetes
Storage
Switching and Say you were given two pods with two IP
Routing
addresses. How would you do it? Based on
DNS what we discussed in the prerequisite tutorial on
Network DNS, an easy way to get them to resolve each
Namespaces
other is to add an entry into each of their
About Docker /etc/hosts files.
Networking
POD
Networking
CNI in
Kubernetes But of course, when you have 1000s of PODs in
the cluster, and 100s of them being created and
Service deleted every minute. So this is not a suitable
Networking solution.
DNS in
Kubernetes Move entries into a central DNS server
case.
CoreDNS
CoreDNS ourselves.
$ cat /etc/coredns/Corefile
.:53 {
errors
health
kubernetes cluster.local in-addr.a
pods insecure
fallthrough in-addr.arpa ip6.ar
ttl 30
}
prometheus :9153
forward . /etc/resolv.conf
cache 30
reload
}
cache etc.
cluster is set.
database.
created.
service.default.svc.cluster.local.
$ curl web-service
$ curl web-service.default
$ curl web-service.default.svc
$ curl web-service.default.svc.cluster
happens to be web-
service.default.svc.cluster.local.
$ host web-service
web-service.default.svc.cluster.local
default.svc.cluster.local as well as
svc.cluster.local and cluster.local.
$ cat /etc/resolv.conf
nameserver 10.96.0.10
search default.svc.cluster.local sv
$ host web-service
web-service.default.svc.cluster.local
$ host web-service.default
web-service.default.svc.cluster.local
$ host web-service.default.svc
web-service.default.svc.cluster.local
$ host web-service.default.svc.cluster
web-service.default.svc.cluster.local
$ host 10-244-2-5
host 10-244-2-5 not found: 3(NXDOMAIN)
$ host 10-244-2-5.default.svc.cluster
web-service.default.svc.cluster.local
Prev Next
Quick Links Tutorials Contact Info
Suggestions Spring
Our mission is to deliver
simply easy learning with Contact Us Hibernate
clear and in depth content
on a wide range of See More…
technical stuff.