它似乎默认监听 80 - 明智的 - 但如果我想让它监听(例如)8000 上的请求,我将如何指定?
为清楚起见,这是通过通过 minikube addons enable ingress
启用的 nginx Controller 实现的。 )
最佳答案
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
这意味着它将为 HTTP 和 HTTPS 端口使用默认端口。
从文档中我们可以阅读:
An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type Service.Type=NodePort or Service.Type=LoadBalancer.
关于kubernetes - 您如何为 Minikube 上的入口 Controller 指定自定义端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59267059/