简体   繁体   English

在通过Nginx Ingress Controller引入Ingress后无法访问Kubernetes Services

[英]Kubernetes Services not reachable after introducing Ingress with nginx Ingress Controller

I have some services with external IP addresses in Kubernetes that I was able to reach by navigating to the IP. 我在Kubernetes中有一些带有外部IP地址的服务,可以通过导航到IP来访问。 I then configured an Ingress with a nginx Ingress-Controller: 然后,我使用nginx Ingress-Controller配置了一个Ingress:

  annotations:
    kubernetes.io/ingress.class: "nginx"

I can now reach the service over the static IP of the Ingress, as expected. 现在,我可以按预期通过Ingress的静态IP到达服务。 But can no longer reach the service directly over its external IP, nor any other services in k8s... why can't I reach the services with Ingress configured? 但是,不能再直接通过其外部IP来访问该服务,也不能再通过k8s中的任何其他服务来访问...为什么我不能在配置了Ingress的情况下访问该服务?

The Ingress Controller needs to be configured to allow access via its rules . 需要将Ingress Controller配置为允许通过其rules进行访问。 See the documentation here: https://kubernetes.io/docs/user-guide/ingress/ 请参阅此处的文档: https : //kubernetes.io/docs/user-guide/ingress/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM