Does nginx Ingress controller require a Service in Kubernetes?

https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#why-endpoints-and-not-services

Currently, my setup is pretty standard in that I have a deployment, a ClusterIP service, and an Ingress.

I also use nginx Ingress controller and my default understanding is that you need a service to make your pods accessible within a cluster, and and Ingress to route traffic outside of the cluster to your service.

The documentation above, however, says that a service is not used and pods are accessed via the Endpoints API.

This is a bit confusing in that I don’t understand whether this means I don’t even need to create a Service.

Thanks!

I have always had both services and ingresses so it feels a bit risky to experiment without a proper understanding.

Leave a Comment