Kubernetes in GKE - Nginx Ingress deployment - Public IP assigned to Ingress resource

9/18/2019

TLDR, Why does the Ingress Resource have a public IP? Really, I'm seeking the why.

The description "Where 107.178.254.228 is the IP allocated by the Ingress controller to satisfy this Ingress." from the Kubernetes documentation doesn't really satisfy my need to understand it fully.

My understanding of the resource is that in this instance, it's acting as a pseudo-Nginx configuration, which does make sense to me based solely on the configuration elements. Though, the sticking point is why does itself, the resource, have a public IP? Following labs for this implementation, I also found that SSH is listening on this resource publicly, which I find strange. In testing, from the controller, the network path to this IP does egress the network so this isn't the case of another public IP being assigned on a VIF so that traffic can be routed on a local interface.

FWIW, my testing has been entirely in GKE but based on the documentation this seems to be simply "how it works" across platforms.

-- binarynimbus
kubernetes
kubernetes-ingress
networking
nginx

1 Answer

9/18/2019

Ingress used in GKE or cloud provider will have "the same effect" as a service Load Balancer in the way that it will create a load balancer resource on your cloud provider. That explains why it has a public IP.

If you don't need to have a Global load balancer (gce in annotation) you could limit yourself to a simple load balancer service.

-- night-gold
Source: StackOverflow