There are two Nginx Ingress Controllers for k8s. What?

Grigor Khachatryan
3 min readMay 18, 2021

--

There are two NGINX-based Ingress controller implementations out there: the one you can find in nginxinc/kubernetes-ingress repo and the one from kubernetes/ingress-nginx repo.
Information in this article should help you to choose an appropriate implementation for your requirements. (or move from one implementation to the other.)

What is Ingress Controller?

In order for the Ingress resource to work, the cluster must have an Ingress controller running. An Ingress controller abstracts away the complexity of Kubernetes application traffic routing and provides a bridge between Kubernetes services and external ones (external world).

You may deploy any number of Ingress Controllers within a cluster. When you create an Ingress, you should annotate each Ingress with the appropriate ingress.class to indicate which ingress controller should be used if more than one exists within your cluster.

If you do not define a class, your cloud provider may use a default ingress controller.

Ideally, all ingress controllers should fulfill this specification, but the various ingress controllers operate slightly differently.

There are two popular Kubernetes Ingress controllers that use NGINX — both are open source and hosted on GitHub. One is maintained by the Kubernetes open source community ( kubernetes/ingress-nginx on GitHub) and one is maintained by NGINX, Inc. ( nginxinc/kubernetes-ingress on GitHub).

The Key Differences

Kubernetes Ingress Controller

The “official” Kubernetes controller. It is being developed by the community. As you might guess from the name, it is based on Nginx web server and is supplemented with a set of Lua plugins used to implement extra features. Thanks to the popularity of NGINX and minimal modifications over it when using as a controller, it can be the simplest and most straightforward option for an average engineer dealing with K8s.

NGINX Ingress Controller

This is the official product from NGINX developers which also has a commercial version based on NGINX Plus. NGINX controller features high stability level, constant backward compatibility, absence of any third-party modules, promised high speed (in comparison with the official controller) achieved thanks to the elimination of Lua code.

The freeware version is significantly limited, even when compared with the official controller (due to the absence of mentioned above Lua modules).

At the same time, the paid version has a fairly wide additional functionality: real-time metrics, JWT validation, active health checks, and so on. The important advantage over NGINX Ingress is the full support for TCP/UDP traffic (and in the community version too!).

Some prominent features (including requests tracing with OpenTracing and improved traffic splitting) have been added to this controller with its v1.6.0 release in Dec’19.

For the key difference between nginxinc/kubernetes-ingress and kubernetes/ingress-nginx Ingress controllers you can check out this table:

https://gist.github.com/grigorkh/f8e4fd73e99f0fde06a51e2ed7c2156c

References:

Kubernetes Ingress Controllers — https://kubernetes.io.
Nginx blog — https://www.nginx.com/blog.
Github repo of nginxinc — https://github.com/nginxinc.
Flant blog — https://medium.com/flant-com.

--

--