diff --git a/content/rancher/v2.x/en/troubleshooting/dns/_index.md b/content/rancher/v2.x/en/troubleshooting/dns/_index.md index 56687b26ee2..431942c9a44 100644 --- a/content/rancher/v2.x/en/troubleshooting/dns/_index.md +++ b/content/rancher/v2.x/en/troubleshooting/dns/_index.md @@ -162,3 +162,14 @@ pod "kube-dns-5fd74c7488-6pwsf" deleted ``` Try to resolve name again using [Check if domain names are resolving](#check-if-domain-names-are-resolving). + +If you want to check the kube-dns configuration in your cluster (for example, to check if there are different upstream nameservers configured), you can run the following command to list the kube-dns configuration: + +``` +kubectl -n kube-system get configmap kube-dns -o go-template='{{range $key, $value := .data}}{{ $key }}{{":"}}{{ $value }}{{"\n"}}{{end}}' +``` + +Example output: +``` +upstreamNameservers:["1.1.1.1"] +``` diff --git a/content/rke/v0.1.x/en/config-options/add-ons/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/_index.md index 64914d11ab4..474b8d29037 100644 --- a/content/rke/v0.1.x/en/config-options/add-ons/_index.md +++ b/content/rke/v0.1.x/en/config-options/add-ons/_index.md @@ -7,7 +7,7 @@ RKE supports pluggable add-ons. Add-ons are used to deploy several cluster compo * [Network plug-ins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/) * [Ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) -* KubeDNS +* [DNS provider]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/dns/) The images used for these add-ons under the [`system_images` directive]({{< baseurl >}}/rke/v0.1.x/en/config-options/system-images/). For each Kubernetes version, there are default images associated with each add-on, but these can be overridden by changing the image tag in `system_images`. diff --git a/content/rke/v0.1.x/en/config-options/add-ons/dns/_index.md b/content/rke/v0.1.x/en/config-options/add-ons/dns/_index.md new file mode 100644 index 00000000000..e3ab1de3e1c --- /dev/null +++ b/content/rke/v0.1.x/en/config-options/add-ons/dns/_index.md @@ -0,0 +1,64 @@ +--- +title: DNS provider +weight: 262 +--- + +By default, RKE deploys [kube-dns](https://github.com/kubernetes/dns) as DNS provider for your cluster. + +RKE will deploy kube-dns as a Deployment with the default replica count of 1. The pod consists of 3 containers: `kubedns`, `dnsmasq` and `sidecar`. RKE will also deploy kube-dns-autoscaler as a Deployment, which will scale the kube-dns Deployment by using the number of cores and nodes. Please see [Linear Mode](https://github.com/kubernetes-incubator/cluster-proportional-autoscaler#linear-mode) for more information about this logic. + +The images used for kube-dns are under the [`system_images` directive]({{< baseurl >}}/rke/v0.1.x/en/config-options/system-images/). For each Kubernetes version, there are default images associated with kube-dns, but these can be overridden by changing the image tag in `system_images`. + +## Scheduling kube-dns + +If you only wanted ingress controllers to be deployed on specific nodes, you can set a `node_selector` for the ingress. The label in the `node_selector` would need to match the label on the nodes for the ingress controller to be deployed. + +```yaml +nodes: + - address: 1.1.1.1 + role: [controlplane,worker,etcd] + user: root + labels: + app: dns + +dns: + provider: kube-dns + node_selector: + app: dns +``` + +## Disabling kube-dns + +You can disable the default DNS provider by specifying `none` to the dns `provider` directive in the cluster configuration. Be aware that this will prevent your pods from doing name resolution in your cluster. + +```yaml +dns: + provider: none +``` +## Configuring kube-dns + +### Upstream nameservers + +By default, kube-dns will use the host configured nameservers (usually residing at `/etc/resolv.conf`) to resolve external queries. If you want to configure specific upstream nameservers to be used by kube-dns, you can use the `upstreamnameservers` directive. + +```yaml +dns: + provider: kube-dns + upstreamnameservers: + - 1.1.1.1 + - 8.8.4.4 +``` + +## CoreDNS (experimental) + +
Experimental support for CoreDNS is available in RKE v0.2.0 and later.
+ +If you want to use CoreDNS, you can set the `provider` directive to `coredns`. Both the `node_selector` and `upstreamnameservers` directive is also supported for CoreDNS. + +```yaml +dns: + provider: coredns + upstreamnameservers: + - 1.1.1.1 + - 8.8.4.4 +``` diff --git a/content/rke/v0.1.x/en/config-options/system-images/_index.md b/content/rke/v0.1.x/en/config-options/system-images/_index.md index 060a1dd7faa..a8e3f786049 100644 --- a/content/rke/v0.1.x/en/config-options/system-images/_index.md +++ b/content/rke/v0.1.x/en/config-options/system-images/_index.md @@ -6,7 +6,7 @@ When RKE is deploying Kubernetes, there are several images that are pulled. Thes As of `v0.1.6`, the functionality of a couple of the system images were consolidated into a single `rancher/rke-tools` image to simplify and speed the deployment process. -You can configure the [network plug-ins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/) and [ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) as well as the options for these add-ons separately. +You can configure the [network plug-ins]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/network-plugins/), [ingress controller]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/ingress-controllers/) and [dns provider]({{< baseurl >}}/rke/v0.1.x/en/config-options/add-ons/dns/) as well as the options for these add-ons separately. This is the example of the full list of system images used to deploy Kubernetes through RKE. The image tags are dependent on the [Kubernetes image/version used](https://github.com/rancher/types/blob/master/apis/management.cattle.io/v3/k8s_defaults.go). @@ -14,39 +14,49 @@ This is the example of the full list of system images used to deploy Kubernetes ```yaml system_images: - kubernetes: rancher/hyperkube:v1.10.3-rancher2 - etcd: rancher/coreos-etcd:v3.1.12 - alpine: rancher/rke-tools:v0.1.9 - nginx_proxy: rancher/rke-tools:v0.1.9 - cert_downloader: rancher/rke-tools:v0.1.9 - kubernetes_services_sidecar: rancher/rke-tools:v0.1.9 - kubedns: rancher/k8s-dns-kube-dns-amd64:1.14.8 - dnsmasq: rancher/k8s-dns-dnsmasq-nanny-amd64:1.14.8 - kubedns_sidecar: rancher/k8s-dns-sidecar-amd64:1.14.8 - kubedns_autoscaler: rancher/cluster-proportional-autoscaler-amd64:1.0.0 - pod_infra_container: rancher/pause-amd64:3.1 + etcd: rancher/coreos-etcd:v3.2.24 + alpine: rancher/rke-tools:v0.1.24 + nginx_proxy: rancher/rke-tools:v0.1.24 + cert_downloader: rancher/rke-tools:v0.1.24 + kubernetes: rancher/hyperkube:v1.13.1-rancher1 + kubernetes_services_sidecar: rancher/rke-tools:v0.1.24 + pod_infra_container: rancher/pause-amd64:3.1 - # Flannel Networking Options - flannel: rancher/coreos-flannel:v0.9.1 - flannel_cni: rancher/coreos-flannel-cni:v0.2.0 + # kube-dns images + kubedns: rancher/k8s-dns-kube-dns-amd64:1.15.0 + dnsmasq: rancher/k8s-dns-dnsmasq-nanny-amd64:1.15.0 + kubedns_sidecar: rancher/k8s-dns-sidecar-amd64:1.15.0 + kubedns_autoscaler: rancher/cluster-proportional-autoscaler-amd64:1.0.0 - # Calico Networking Options - calico_node: rancher/calico-node:v3.1.1 - calico_cni: rancher/calico-cni:v3.1.1 - calico_ctl: rancher/calico-ctl:v2.0.0 + # CoreDNS images + coredns: coredns/coredns:1.2.6 + coredns_autoscaler: rancher/cluster-proportional-autoscaler-amd64:1.0.0 - # Canal Networking Options - canal_node: rancher/calico-node:v3.1.1 - canal_cni: rancher/calico-cni:v3.1.1 - canal_flannel: rancher/coreos-flannel:v0.9.1 + # Flannel images + flannel: rancher/coreos-flannel:v0.10.0 + flannel_cni: rancher/coreos-flannel-cni:v0.3.0 - # Weave Networking Options - weave_node: weaveworks/weave-kube:2.1.2 - weave_cni: weaveworks/weave-npc:2.1.2 + # Calico images + calico_node: rancher/calico-node:v3.4.0 + calico_cni: rancher/calico-cni:v3.4.0 + calico_controllers: "" + calico_ctl: rancher/calico-ctl:v2.0.0 - # Ingress Options - ingress: rancher/nginx-ingress-controller:0.10.2-rancher3 - ingress_backend: rancher/nginx-ingress-controller-defaultbackend:1.4 + # Canal images + canal_node: rancher/calico-node:v3.4.0 + canal_cni: rancher/calico-cni:v3.4.0 + canal_flannel: rancher/coreos-flannel:v0.10.0 + + # Weave images + weave_node: weaveworks/weave-kube:2.5.0 + weave_cni: weaveworks/weave-npc:2.5.0 + + # Ingress controller images + ingress: rancher/nginx-ingress-controller:0.21.0-rancher1 + ingress_backend: rancher/nginx-ingress-controller-defaultbackend:1.4 + + # Metrics server image + metrics_server: rancher/metrics-server-amd64:v0.3.1 ``` Prior to `v0.1.6`, instead of using the `rancher/rke-tools` image, we used the following images: