mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
Add troubleshooting for loopback address in DNS troubleshooting
This commit is contained in:
committed by
Denise
parent
7282ee0962
commit
9e493cdb6c
@@ -139,3 +139,26 @@ Pod kube-dns-667c7cb9dd-z4dsf on host x.x.x.x
|
||||
nameserver 1.1.1.1
|
||||
nameserver 8.8.4.4
|
||||
```
|
||||
|
||||
If the output shows an address in the loopback range (`127.0.0.0/8`), you can correct this in two ways:
|
||||
|
||||
* Make sure the correct nameservers are listed in `/etc/resolv.conf` on your nodes in the cluster, please consult your operating system documentation on how to do this. Make sure you execute this before provisioning a cluster, or reboot the nodes after making the modification.
|
||||
* Configure the `kubelet` to use a different file for resolving names, by using `extra_args` as shown below (where `/run/resolvconf/resolv.conf` is the file with the correct nameservers):
|
||||
|
||||
```
|
||||
services:
|
||||
kubelet:
|
||||
extra_args:
|
||||
resolv-conf: "/run/resolvconf/resolv.conf"
|
||||
```
|
||||
|
||||
> **Note:** As the `kubelet` is running inside a container, the path for files located in `/etc` and `/usr` are in `/host/etc` and `/host/usr` inside the `kubelet` container.
|
||||
|
||||
See [Editing Cluster as YAML]({{< baseurl >}}/rancher/v2.x/en/k8s-in-rancher/editing-clusters/#editing-cluster-as-yaml) how to apply this change. When the provisioning of the cluster has finished, you have to remove the kube-dns pod to activate the new setting in the pod:
|
||||
|
||||
```
|
||||
kubectl delete pods -n kube-system -l k8s-app=kube-dns
|
||||
pod "kube-dns-5fd74c7488-6pwsf" deleted
|
||||
```
|
||||
|
||||
Try to resolve name again using [Check if domain names are resolving](#check-if-domain-names-are-resolving).
|
||||
|
||||
Reference in New Issue
Block a user