我对Kubernetes很新,我正在尝试启动kubernetes集群并部署一些pod。
我有一个想要构建的映像,以便对其进行部署,因此我尝试构建它的dockerfile,但是dockerfile中的一个步骤尝试访问golobal资源: curl --silent --location https://rpm.nodesource.com/setup_7.x
我不断收到此错误消息: 连接到rpm.nodesource.com(rpm.nodesource.com)| 13.32.153.164 |:443 ...失败:连接超时。 连接到rpm.nodesource.com(rpm.nodesource.com)| 2600:9000:2116:2800:16:cdcc:51c0:93a1 |:443 ...失败:网络无法访问
我可以看到容器能够解析dns名称(基于它在消息中输出的IP),但无法访问它。
我的/etc/resolv.conf是: 搜索default.svc.cluster.local svc.cluster.local 名称服务器10.82.67.3 名称服务器10.233.0.3 nameserver 8.8.8.8 options ndots:2次超时:2次尝试:2次
我的码头版本是17.05.0-ce 我的操作系统是redhat 7.4
这是容器的docker inpect命令的网络部分:
"NetworkSettings": {
"Bridge": "",
"SandboxID": "a4a4c93d0ea19b48b84ef8556678f458405b32238542ede30a78229f82b55a12",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/a4a4c93d0ea1",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "66d74579ee50bc8289dfc58235188e262ebf707f2f0ae0ccb640524e6e9d3f22",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "655da32f8ecab7a4bba100594a1e242c60b27304e9937ae5192857942b661603",
"EndpointID": "66d74579ee50bc8289dfc58235188e262ebf707f2f0ae0ccb640524e6e9d3f22",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02"
}
}
}
任何帮助都是适当的