Ingress controller vs api gateway

Ingress

Ingress manages and route the traffic into Kubernetes services.

Ingress rules/config yaml and backed by Ingress controller (Nginx ingress controller famous one)

Ingress controller makes one Kubernetes service using that get exposed as LoadBalancer.

enter image description here

Other list of ingrss controller : https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/

For simple understanding, you can consider ingress as Nginx server which just do the work of forwarding the traffic to services based on the ruleset.

ingress don't have much functionality like API gateway. Some of ingress don't support authentication, rate limiting, application routing, security, merging response & request, and other add-ons/plugin options.

API gateway

API gateway can also do the work of simple routing but it's mostly gets used when you need higher flexibility, security and configuration options.

There are lots of parameters to compare when you are choosing the Ingress or API gateway however it's more depends on your usecase.

API gateway like KrakenD, Kong are way better compare to ingress have security integration like Oauth plugin, API key option, it support rate-limiting, API aggregation.

Kong API gateway also has a good plugin option which you can use if you want to configure logging/monitoring of traffic also.

There are so many API gateways available in the market same as the ingress controller, you can check the API gateway feature and comparison below.

enter image description here

Read more at : https://medium.com/@harsh.manvar111/api-gateway-identity-server-comparison-ec439468cc8a

If your use case is small and sure about requirement you can use the ingress also for production API gateway is not necessary.


Ingress controller allows single ip-port to access all services running in k8s through ingress rules. The ingress controller service is set to load balancer so it is accessible from public internet.

An api gateway is used for application routing, rate limiting, security, request and response handling and other application related tasks. Say, you have a microservice based application in which the request needs an information to be collected from multiple micro services. You need a way to distribute the user requests to different services and gather the responses from all micro services and prepare the final response to be sent to the user. API Gateway is the one which does this kind of work for you.