test测试失败
来源:9-8 Django集成K8S

阿冯宝贝
2023-03-29
报错如下
这个报错发生在将token和ca.crt带入时,在def _test_k8s_apiserver(self)中报错如下
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.85', port=6643): Max retries exceeded with url: /api/v1/pods?watch=False
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D13AFB3B80>: Failed to establish a new connection: [WinErr
or 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
我的~/.kube/config里面的地址是
server: https://cluster-endpoint:6443
因为我在hosts中做了
192.168.0.85 cluster-endpoint
我不知道是不是跟这个有关系,如果是 我应该怎么进行修改
写回答
1回答
-
同学你好,在代码里面用域名和ip映射不行哦,代码里面指定真实ip042023-03-30
相似问题