-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more description of how the operator works #164
Add more description of how the operator works #164
Conversation
* README.md: Mention that the operator allows some Corefile configuration. Expand the "How it works" section.
7d93473
to
71d3e37
Compare
|
||
The DaemonSet's pod template specifies a "dns" container with CoreDNS and a "dns-node-resolver" container with a process that adds the cluster image registry service's DNS name to the host node's `/etc/hosts` file (see below). | ||
|
||
In order to resolve cluster service DNS names, the operator configures CoreDNS with the [kubernetes plugin](https://coredns.io/plugins/kubernetes/). This plugin resolves DNS names of the form `<service name>.<namespace>.svc.cluster.local` to the identified Service's corresponding endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugin also resolves pod names. For example:
$ oc get po/nginx -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx 1/1 Running 0 6m31s 10.128.2.29 ip-10-0-139-148.us-west-2.compute.internal <none> <none>
$ oc exec -ti dnsutils -- nslookup 10-128-2-29.default.pod.cluster.local
Server: 172.30.0.10
Address: 172.30.0.10#53
Name: 10-128-2-29.default.pod.cluster.local
Address: 10.128.2.29
|
||
In order to resolve external DNS names, the operator configures CoreDNS to forward to the upstream name servers configured in the node host's `/etc/resolv.conf` (typically these name servers come from DHCP or are injected into a custom VM image). The operator allows the user to configure additional upstreams to use for specific zones; see <https://github.com/openshift/enhancements/blob/master/enhancements/dns/plugins.md>. | ||
|
||
The operator also creates a Service with a fixed IP address. This address is derived from the service network CIDR, namely by taking the tenth address in the address space. For example, if the service network CIDR is 172.30.0.0/16, then the DNS service's address is 172.30.0.10. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an example will help:
$ oc get network/cluster -o jsonpath='{.status.serviceNetwork[0]}'
172.30.0.0/16
@@ -5,11 +5,30 @@ The DNS Operator deploys and manages [CoreDNS](https://coredns.io) to provide a | |||
The operator tries to be useful out of the box by creating a working default deployment based on the cluster's configuration. | |||
|
|||
* The default cluster domain is `cluster.local`. | |||
* Configuration of the CoreDNS [Corefile](https://coredns.io/manual/toc/#configuration) or [kubernetes plugin](https://coredns.io/plugins/kubernetes/) is not yet supported. | |||
* Limited configuration of the CoreDNS [Corefile](https://coredns.io/manual/toc/#configuration) or [kubernetes plugin](https://coredns.io/plugins/kubernetes/) is supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miciah I'm confused by or
in this sentence. The k8s plugin is a subset of the corefile config, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I should change "or" to "and". Would that be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the bullet as:
Limited configuration of the CoreDNS Corefile.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, Miciah The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
13 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
README.md
: Mention that the operator allows someCorefile
configuration. Expand the "How it works" section.