admin: dns: merge from the build dir#1251
Conversation
|
cc @thockin who originally wrote the build/kube-dns README |
|
|
||
| ## What things get DNS names? | ||
|
|
||
| Every Service defined in the cluster (including the DNS server itself) will be |
There was a problem hiding this comment.
Try to avoid future tense "will be".
"Every Service defined in the cluster (including the DNS server itself) is assigned a DNS name."
| When enabled, pods are assigned a DNS A record in the form of `pod-ip-address.my-namespace.pod.cluster.local`. | ||
|
|
||
| For example, a pod with ip `1.2.3.4` in the namespace `default` with a dns name of `cluster.local` would have an entry: `1-2-3-4.default.pod.cluster.local`. | ||
|
|
| Given a Pod with the hostname set to "foo" and the subdomain set to "bar", and a headless Service named "bar" in the same namespace, the pod will see it's own FQDN as "foo.bar.my-namespace.svc.cluster.local". DNS will serve an A record at that name, pointing to the Pod's IP. | ||
|
|
||
| With v1.2, the Endpoints object also has a new annotation `endpoints.beta.kubernetes.io/hostnames-map`. Its value is the json representation of map[string(IP)][endpoints.HostRecord], for example: '{"10.245.1.6":{HostName: "my-webserver"}}'. | ||
| If the Endpoints are for a headless service, then A records will be created with the format <hostname>.<service name>.<pod namespace>.svc.<cluster domain> |
| name: busybox | ||
| ``` | ||
|
|
||
| If there exists a headless service in the same namespace as the pod and with the same name as the subdomain, the cluster's KubeDNS Server will also return an A record for the Pod's fully qualified hostname. |
There was a problem hiding this comment.
will also return -> also returns
| ``` | ||
|
|
||
| If there exists a headless service in the same namespace as the pod and with the same name as the subdomain, the cluster's KubeDNS Server will also return an A record for the Pod's fully qualified hostname. | ||
| Given a Pod with the hostname set to "foo" and the subdomain set to "bar", and a headless Service named "bar" in the same namespace, the pod will see it's own FQDN as "foo.bar.my-namespace.svc.cluster.local". DNS will serve an A record at that name, pointing to the Pod's IP. |
There was a problem hiding this comment.
will serve -> serves
| `pod.beta.kubernetes.io/hostname` annotation value. | ||
|
|
||
| v1.2 introduces a beta feature where the user can specify a Pod annotation, `pod.beta.kubernetes.io/subdomain`, to specify what the Pod's subdomain should be. | ||
| If the annotation is specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>". |
There was a problem hiding this comment.
Passive voice.
If the annotation is specified -> If you specify the annotation
| Currently when a pod is created, its hostname is the Pod's `metadata.name` value. | ||
|
|
||
| With v1.2, users can specify a Pod annotation, `pod.beta.kubernetes.io/hostname`, to specify what the Pod's hostname should be. | ||
| If the annotation is specified, the annotation value takes precendence over the Pod's name, to be the hostname of the pod. |
There was a problem hiding this comment.
Passive voice.
If the annotation is specified -> If you specify the annotation
"the annotation value takes precendence over the Pod name and becomes the hostname for that Pod."
a1d586d to
885fb63
Compare
|
@devin-donnelly thanks, I think I addresses all of your feedback. |
devin-donnelly
left a comment
There was a problem hiding this comment.
Just one more nit; I think you got stuck between sentence edits here.
| configured to tell individual containers to use the DNS Service's IP to resolve DNS names. | ||
|
|
||
| Every Service defined in the cluster (including the DNS server itself) will be | ||
| A scheduled DNS Pod and Service on the cluster, and the kubelets configured to |
There was a problem hiding this comment.
Looks like this is an incomplete sentence. How about:
"Kubernetes DNS schedules a DNS Pod and Service on th cluster, and configures the kubelets to tell individual containers to use the DNS Service's IP to resolve DNS names."
|
Just one more nit, @philips . |
885fb63 to
dfee30a
Compare
Try and clean this mess up where the build dir has user facing docs and move them here. Ref: kubernetes/kubernetes#32931
dfee30a to
8aa10a6
Compare
|
@devin-donnelly Addressed feedback, thanks for the review! |
|
@devin-donnelly What is the next step here? Sorry to keep bugging but I want to get this cleaned up. |
Signed-off-by: Charles Pretzer <charles@buoyant.io>
Signed-off-by: Mr. Erlison <sisal.cordame_0a@icloud.com> Signed-off-by: Mr. Erlison <sisal.cordame_0a@icloud.com>
Try and clean this mess up where the build dir has user facing docs and move them here.
Ref: kubernetes/kubernetes#32931
This change is