Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

dns - after kubectl logs, error:dial tcp: lookup istio on 127.0.0.11:53: no such host

I use two computers as the node machines of kubernetes. When I want to query the log through kubectl, the following error occurred, "no such host:

kubectl get pods -n kube-system
NAME                       READY   STATUS    RESTARTS   AGE
coredns-775d49b59c-2vv4t   1/1     Running   1          21h
coredns-775d49b59c-4zltp   1/1     Running   0          21h

kubectl get nodes -o wide
NAME    STATUS   ROLES    AGE   VERSION                         INTERNAL-IP      EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION     CONTAINER-RUNTIME
istio   Ready    <none>   21h   v1.20.3-rc.0.3+ccb394fd1a695f   192.168.56.201   <none>        Ubuntu 18.04.5 LTS   5.4.0-58-generic   docker://19.3.13
ms      Ready    <none>   22h   v1.20.3-rc.0.3+ccb394fd1a695f   192.168.56.66    <none>        Ubuntu 18.04.5 LTS   5.4.0-59-generic   docker://19.3.13

kubectl logs coredns-775d49b59c-2vv4t -n kube-system
Error from server: Get "https://istio:10250/containerLogs/kube-system/coredns-775d49b59c-2vv4t/coredns": dial tcp: lookup istio on 127.0.0.11:53: no such host

thomas@ms:~$ ping istio 
PING istio (192.168.56.201) 56(84) bytes of data.
64 bytes from istio (192.168.56.201): icmp_seq=1 ttl=64 time=2.30 ms
64 bytes from istio (192.168.56.201): icmp_seq=2 ttl=64 time=2.49 ms

thomas@istio:~$ ping istio 
PING istio (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.060 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.052 ms

my cni config is:

{
    "cniVersion": "0.3.1",
    "name": "istionet",
    "type": "bridge",
    "bridge": "cnioistio",
    "isGateway": true,
    "ipMasq": true,
    "ipam": {
        "type": "host-local",
        "subnet": "10.32.0.0/16",
        "routes": [
          {"dst": "0.0.0.0/0"}
        ]
    }

}

I hava used dig command to istio in istio pc:

dig @127.0.0.53 istio

 ANSWER SECTION:
istio.          0   IN  A   127.0.0.1
istio.          0   IN  A   192.168.56.201

  Query time: 0 msec
  SERVER: 127.0.0.53#53(127.0.0.53)
  WHEN: Thu Jan 28 15:47:19 CST 2021
  MSG SIZE  rcvd: 66



but after I use 127.0.0.11,it show connection timed out; no servers could be reached. I can ping 127.0.0.11 Is docker DNS problem?

question from:https://stackoverflow.com/questions/65937897/after-kubectl-logs-errordial-tcp-lookup-istio-on-127-0-0-1153-no-such-host

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...