安装过程中域名解析

安装过程报错:

ericdaff

4小时前

[root@kube-master1 c7nctl-0.20.0]# kubectl logs -f c7n-slaver-47htk -n c7n-system
2020/03/05 03:51:40 [INFO] server starting on :9000
2020/03/05 03:52:34 [INFO] socket checking postgresql-postgresql:5432
2020/03/05 03:52:34 [INFO] Connection error: dial tcp 166.166.123.161:5432: getsockopt: connection refused
2020/03/05 03:52:44 [INFO] socket checking postgresql-postgresql:5432
2020/03/05 03:52:44 [INFO] POST: http://195.168.9.64:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] add domain map: gitlab.ume.choerodon.io => 4Y32YsoRdmXFv72URGK2Q81r5R
2020/03/05 03:52:44 [INFO] POST: http://195.168.233.192:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] POST: http://195.168.119.129:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] POST: http://195.168.169.65:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] POST: http://195.168.102.64:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] POST: http://195.168.53.192:9000/c7n/acme-challenge
2020/03/05 03:52:44 [INFO] POST: http://195.168.195.1:9000/c7n/acme-challenge
2020/03/05 03:52:44 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:46 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:48 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:50 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:52 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:54 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:56 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:52:58 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:53:00 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:53:02 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:53:04 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/05 03:53:06 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp

原因分析:
一开始怀疑coredns原因
data:
Corefile: |
.:53 {
errors
health
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
proxy . 10.221.8.67
cache 30
loop
reload
loadbalance
}
ume.choerodon:53 {
errors
cache 30
proxy . 10.221.8.67
}
但是在此基础上创建了一个pod发现在pod中可以ping通域名
[root@kube-master1 coredns]# kubectl get po -n default
NAME READY STATUS RESTARTS AGE
gateway-799bdbfbd7-2jlq6 1/1 Running 0 52m
nfs-client-provisioner-666957674-sl7bp 1/1 Running 0 7d8h
[root@kube-master1 coredns]# kubectl exec -it gateway-799bdbfbd7-2jlq6 -n default /bin/bash
[jboss5@gateway-799bdbfbd7-2jlq6 /]$ ping gitlab.ume.choerodon.io
PING gitlab.ume.choerodon.io (10.221.8.61) 56(84) bytes of data.
64 bytes from 10-221-8-61.kubernetes.default.svc.cluster.local (10.221.8.61): icmp_seq=1 ttl=63 time=0.372 ms
64 bytes from 10-221-8-61.kubernetes.default.svc.cluster.local (10.221.8.61): icmp_seq=2 ttl=63 time=0.303 ms
64 bytes from 10-221-8-61.kubernetes.default.svc.cluster.local (10.221.8.61): icmp_seq=3 ttl=63 time=0.294 ms
64 bytes from 10-221-8-61.kubernetes.default.svc.cluster.local (10.221.8.61): icmp_seq=4 ttl=63 time=0.245 ms
64 bytes from 10-221-8-61.kubernetes.default.svc.cluster.local (10.221.8.61): icmp_seq=5 ttl=63 time=0.356 ms
^C
gitlab.ume.choerodon.io ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 0.245/0.314/0.372/0.045 ms