3

我无法在 OKD 中构建 pod,因为 Github 无法解析并且构建失败。

错误:

Cloning "https://github.com/MeMyselfI/okd-hello-world " ...
error: fatal: unable to access 'https://github.com/MeMyselfI/okd-hello-world/': Could not resolve host: github.com; Unknown error 

OKD是如何启动的:

sudo oc cluster up --routing-suffix=192.168.2.20.xip.io --public-hostname=192.168.2.20

OC客户端版本:

me@server:~$ sudo oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

ping从 SSH 提示符:

me@server:~$ ping github.com
PING github.com (192.30.253.113) 56(84) bytes of data.
64 bytes from lb-192-30-253-113-iad.github.com (192.30.253.113): icmp_seq=1 ttl=52 time=33.4 ms
64 bytes from lb-192-30-253-113-iad.github.com (192.30.253.113): icmp_seq=2 ttl=52 time=34.0 ms

ping从本地手动启动的 Docker 容器:

me@server:~$ sudo docker exec -it hwnodemongo_web_1 /bin/bash
root@7c2db2faacf7:/usr/src/app# ping github.com
PING github.com (192.30.253.112) 56(84) bytes of data.
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=1 ttl=52 time=28.3 ms
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=2 ttl=52 time=27.4 ms

的输出resolv.conf

me@server:~$ cat /etc/resolv.conf
nameserver 8.8.8.8

dnsmasq在跑:

dnsmasq   1479  0.0  0.0  51580   376 ?        S    12:07   0:00 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5 --trust-anchor=.,20326,8,2,e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d

dig来自 SSH:

me@server.com:~$ dig github.com

; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20999
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.                    IN      A

;; ANSWER SECTION:
github.com.             59      IN      A       192.30.253.113
github.com.             59      IN      A       192.30.253.112

;; Query time: 46 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Apr 05 13:23:47 ADT 2019
;; MSG SIZE  rcvd: 71

更新:

我在另一台机器上重新安装。我使用oc cluster up(没有任何其他参数)并得到了相同的结果(通过访问localhost:8443/console)。

4

0 回答 0