我无法192.168.0.240
从集群外部访问分配的 IP 地址 ( )。
❯ kubectl get services -n kube-system -l app=nginx-ingress -o wide
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
nginx-ingress-controller LoadBalancer 10.43.225.204 192.168.0.240 80:31012/TCP,443:32713/TCP 2d2h app=nginx-ingress,component=controller,release=nginx-ingress
从集群节点:
[sseneca@alarm-master ~]$ curl http://192.168.0.240/
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.17.8</center>
</body>
</html>
但从网络上的一台机器但不是集群的一部分:
curl: (7) Failed to connect to 192.168.0.240 port 80: No route to host
并使用ping
:
❯ ping 192.168.0.240
PING 192.168.0.240 (192.168.0.240) 56(84) bytes of data.
From 192.168.0.21 icmp_seq=1 Destination Host Unreachable
From 192.168.0.21 icmp_seq=2 Destination Host Unreachable
From 192.168.0.21 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.0.240 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3095ms
pipe 3
我不知道如何调试这个问题,任何帮助表示赞赏。有人在另一个论坛上提出了建议,但我不明白他们想让我做什么。