0

我有一个内部部署有 kubernetes (k8s) v.1.16 的集群。我已经安装了 MetalLB (v.0.9.3) 和 Nginx (v.1.9.1)。MetalLB 正确设置了 ingress-nginx 外部 IP。然后我部署了以下茶和咖啡服务示例:

https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example

当我从集群内部执行 --curl 测试应用程序时:

IC_IP=xxx.xxx.xxx.xx (External IP assigned by MetalLB to nginx)
IC_HTTPS_PORT=443
curl --resolve cafe.example.com:$IC_HTTPS_PORT:$IC_IP https://cafe.example.com:$IC_HTTPS_PORT/coffee --insecure

它有效,我得到以下响应:

Server address: 192.168.142.204:8080
Server name: coffee-7c45f487fd-kks2q
Date: 11/Dec/2020:13:38:41 +0000
URI: /coffee
Request ID: d8c077785ab3a5e36514cf1719c9ea11

问题是我无法从集群外部访问。我尝试使用https://cafe.example.como/coffeehttps://xxx.xxx.xxx.xx/coffee从 Google Chrome 浏览器得到以下响应:

This site can´t be reached
The webpage at https://cafe.example.com/coffee might be temporarily down or it have moved permanently to a new web address.

有什么建议为什么我无法从集群外部访问?

非常感谢。

问候。

4

0 回答 0