May 2018
Intermediate to advanced
554 pages
13h 51m
English
We have set up several components to see how DNS entries are created initially. The Kubernetes Service name is especially important for determining the name of a DNS.
However, Kubernetes Service has 2 modes, either normal service or headless service. Normal service has already been described in the preceding section; it has its own IP address. On the other hand, headless service doesn't have an IP address.
Let's see how to create a headless service and how name resolution works:
$ kubectl expose deploy my-apache --namespace=chap8-domain1 --name=my-apache-svc-hl --port=80 --type=ClusterIP --cluster-ip=Noneservice "my-apache-svc-hl" ...