安装过程中域名解析问题

  • Choerodon平台版本: 0.20

  • 遇到问题的执行步骤:
    ./c7nctl install -c config.yml --no-timeout --version=0.20

  • 文档地址:
    http://choerodon.io/zh/docs/installation-configuration/steps/install/choerodon/

  • 环境信息(如:节点信息):
    k8s版本1.13.5
    helm版本2.14.3

  • 报错日志:
    安装过程报错:
    2020/03/03 17:55:41 [INFO] Wait domain gitlab.ume.choerodon.io point to cluster, check acme want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}, retry
    2020/03/03 17:55:43 [INFO] Wait domain gitlab.ume.choerodon.io point to cluster, check acme want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}, retry
    2020/03/03 17:55:45 [INFO] Wait domain gitlab.ume.choerodon.io point to cluster, check acme want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}, retry
    2020/03/03 17:55:47 [INFO] Wait domain gitlab.ume.choerodon.io point to cluster, check acme want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}, retry
    2020/03/03 17:55:49 [Error] 请检查您的域名: gitlab.ume.choerodon.io 已正确解析到集群
    2020/03/03 17:55:49 [Error] install failed
    Error: Check domain failed want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}
    Usage:
    c7nctl install [flags]

Flags:
-c, --config-file string User Config file to read from, User define config by this file
–debug enable debug output
-h, --help help for install
–no-timeout disable install job timeout
–prefix string add prefix to all helm release
-r, --resource-file string Resource file to read from, It provide which app should be installed
–skip-input use default username and password to avoid user input
–version string specify a version

Global Flags:
–config string config file (default is $HOME/.c7n.yaml)
-o, --orgCode string org code
-p, --proCode string pro code

Check domain failed want dM1vxTxAM5N1qlbtRQXr342V60 got {“success”:false}

c7n-slaver报错:
2020/03/03 09:55:18 [INFO] socket checking postgresql-postgresql:5432
2020/03/03 09:55:18 [INFO] POST: http://195.168.233.198:9000/c7n/acme-challenge
2020/03/03 09:55:18 [INFO] add domain map: gitlab.ume.choerodon.io => dM1vxTxAM5N1qlbtRQXr342V60
2020/03/03 09:55:18 [INFO] POST: http://195.168.53.196:9000/c7n/acme-challenge
2020/03/03 09:55:19 [INFO] POST: http://195.168.195.4:9000/c7n/acme-challenge
2020/03/03 09:55:19 [INFO] POST: http://195.168.169.67:9000/c7n/acme-challenge
2020/03/03 09:55:19 [INFO] POST: http://195.168.9.69:9000/c7n/acme-challenge
2020/03/03 09:55:19 [INFO] POST: http://195.168.119.133:9000/c7n/acme-challenge
2020/03/03 09:55:19 [INFO] POST: http://195.168.102.69:9000/c7n/acme-challenge
2020/03/03 09:55:19 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:21 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:23 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:25 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:27 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:29 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:31 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:33 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:35 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:37 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:39 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:41 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:43 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:45 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:47 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused
2020/03/03 09:55:49 [Error] Get http://gitlab.ume.choerodon.io/c7n/acme-challenge: dial tcp 10.221.8.61:80: getsockopt: connection refused

  • 原因分析:
    一开始怀疑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

  • 疑问:
    请问这个应该怎么解决呢?