Skip to content

Commit

Permalink
update documentation on CoreDNS
Browse files Browse the repository at this point in the history
  • Loading branch information
rajansandeep committed Nov 8, 2018
1 parent 6c0d730 commit e6c3314
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ about the [service proxy](/docs/concepts/services-networking/service/#virtual-ip

Kubernetes supports 2 primary modes of finding a Service - environment variables
and DNS. The former works out of the box while the latter requires the
[kube-dns cluster addon](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/kube-dns/README.md).
[CoreDNS cluster addon](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/coredns).

### Environment Variables

Expand Down Expand Up @@ -178,7 +178,7 @@ kube-dns ClusterIP 10.0.0.10 <none> 53/UDP,53/TCP 8m

If it isn't running, you can [enable it](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/README.md#how-do-i-configure-it).
The rest of this section will assume you have a Service with a long lived IP
(my-nginx), and a DNS server that has assigned a name to that IP (the kube-dns
(my-nginx), and a DNS server that has assigned a name to that IP (the CoreDNS
cluster addon), so you can talk to the Service from any pod in your cluster using
standard methods (e.g. gethostbyname). Let's run another curl application to test this:

Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/setup/independent/troubleshooting-kubeadm.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ kubectl -n kube-system get deployment coredns -o yaml | \
kubectl apply -f -
```
Another cause for CoreDNS to have `CrashLoopBackOff` is when a CoreDNS Pod deployed in Kubernetes detects a loop. [A number of workarounds](https://github.com/coredns/coredns/tree/master/plugin/loop#troubleshooting-loops-in-kubernetes-clusters)
are available to avoid Kubernetes trying to restart the CoreDNS Pod every time CoreDNS detects the loop and exits.
{{< warning >}}
Disabling SELinux or setting `allowPrivilegeEscalation` to `true` can compromise
the security of your cluster.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/setup/turnkey/gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ You'll see a list of pods that looks something like this (the name specifics wil

```shell
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5f4fbb68df-mc8z8 1/1 Running 0 15m
kube-system fluentd-cloud-logging-kubernetes-minion-63uo 1/1 Running 0 14m
kube-system fluentd-cloud-logging-kubernetes-minion-c1n9 1/1 Running 0 14m
kube-system fluentd-cloud-logging-kubernetes-minion-c4og 1/1 Running 0 14m
kube-system fluentd-cloud-logging-kubernetes-minion-ngua 1/1 Running 0 14m
kube-system kube-dns-v5-7ztia 3/3 Running 0 15m
kube-system kube-ui-v1-curt1 1/1 Running 0 15m
kube-system monitoring-heapster-v5-ex4u3 1/1 Running 1 15m
kube-system monitoring-influx-grafana-v1-piled 2/2 Running 0 15m
Expand Down
5 changes: 5 additions & 0 deletions content/en/docs/tasks/administer-cluster/coredns.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ value to `false`:
kubeadm init --feature-gates=CoreDNS=false
```

## Tuning CoreDNS

When resource utilisation is a concern, it may be useful to tune the configuration of CoreDNS. For more details, check out the
[documentation on scaling CoreDNS]((https://github.com/coredns/deployment/blob/master/kubernetes/Scaling_CoreDNS.md)).

{{% /capture %}}

{{% capture whatsnext %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The Corefile configuration includes the following [plugins](https://coredns.io/p
* [proxy](https://coredns.io/plugins/proxy/): Any queries that are not within the cluster domain of Kubernetes will be forwarded to predefined resolvers (/etc/resolv.conf).
* [cache](https://coredns.io/plugins/cache/): This enables a frontend cache.
* [loop](https://coredns.io/plugins/loop/): Detects simple forwarding loops and halts the CoreDNS process if a loop is found.
* [reload](https://coredns.io/plugins/reload): Allows automatic reload of a changed Corefile.
* [reload](https://coredns.io/plugins/reload): Allows automatic reload of a changed Corefile. After editing the configuration in the ConfigMap, allow 2 mins for these changes to take effect in CoreDNS.
* [loadbalance](https://coredns.io/plugins/loadbalance): This is a round-robin DNS loadbalancer by randomizing the order of A, AAAA, and MX records in the answer.

We can modify the default behavior by modifying this configmap.
Expand Down Expand Up @@ -309,7 +309,7 @@ data:

CoreDNS supports all the functionalities and more that is provided by kube-dns.
A ConfigMap created for kube-dns to support `StubDomains`and `upstreamNameservers` translates to the `proxy` plugin in CoreDNS.
Similarly, the `Federation` plugin translates to the `federation` plugin in CoreDNS.
Similarly, the `Federations` plugin in kube-dns translates to the `federation` plugin in CoreDNS.

### Example

Expand Down

0 comments on commit e6c3314

Please sign in to comment.