
kubectl get svc test-pod NodePort 10.98.13.86 <none> 3001:30001/TCP another-pod NodePort 10.110.208.135 <none> 3000:30001/TCP # 进入容器 test-pod $ sudo kubectl exec -it test-pod /bin/sh # 请求 another-pod / # wget 10.110.208.135:3000 Connecting to 10.110.208.135:3000 (10.110.208.135:3000) wget: server returned error: HTTP/1.1 401 # 注:返回 401 说明网络通了 # 接下来请求自己的服务 / # wget 10.98.13.86:3001 Connecting to 10.98.13.86:3001 (10.98.13.86:3001) # 无响应 # 不写地址写 localhost 是通的 / # wget localhost:3001 Connecting to localhost:3001 (localhost:3001) wget: server returned error: HTTP/1.1 401 十分费解,路由应该是没有问题的。
来 V 站求助
1 mikeguan 2019-09-26 19:06:45 +08:00 via Android 这是阿里云 slb 的一段话 后端服务器无法访问 SLB,对于四层负载均衡服务,目前不支持负载均衡后端 ECS 实例直接为客户端提供服务的同时,又作为负载均衡的后端服务器。 |
2 LudwigWS OP |