Live AMA: Transitioning to the Open Source NGINX Ingress Controller from ingress-nginx - Dec 10, 11

Yes, you are correct that you would need to transition to using Mergeable Ingress Types to replicate the automatic merging behavior that community ingress-nginx provides.

This has to be done using nginx.org/mergeable-ingress-type annotation with master or minion as you can see in the example.

If you create multiple ingresses with same hostname in F5 Nginx Ingress Controller, you’ll run into an issue where only one Ingress is operational and all others will error with “Hostname Collison”

CRDs (VirtualServer, VirtualServerRoute, Policies, GlobalConfiguration and TransportServer) vs. Ingress is a subjective decision but i personally would prefer CRDs:

  • More structured and type-safe
  • Better validation
  • More advanced features (traffic splitting, canary deployments)
  • Future-proof

Ingresses only allow customisation using annotations which can generally spiral into complex looking configs fairly quick.

Recommendation: Gradual Transition to CRDs

  1. For new deployments: Use VirtualServer/VirtualServerRoute CRDs
  2. For existing ones: Convert to Mergeable Ingress Types with annotations
  3. then gradually migrate to VirtualServer CRDs for new and advanced features

Whenever a new functionality is exposed, it generally comes to both Ingress (via annotations) and CRDs

eg :
*Rate-limit using Ingress: https://github.com/nginx/kubernetes-ingress/tree/main/examples/ingress-resources/rate-limit
*Rate-limit using CRDs: https://github.com/nginx/kubernetes-ingress/tree/main/examples/custom-resources/rate-limit

Docs:

  1. Migrate from Ingress-NGINX Controller to NGINX Ingress Controller | NGINX Documentation
  2. VirtualServer and VirtualServerRoute resources | NGINX Documentation
  3. Advanced configuration with Annotations | NGINX Documentation
5 Likes