Migrate from NGINX Ingress Controller to NGINX Gateway Fabric
If you’re already using NGINX Ingress Controller and want to migrate to NGINX Gateway Fabric, you can use the ingress2gateway tool to automatically convert your existing Ingress resources to Gateway API resources.
The Gateway API is the next-generation Kubernetes networking API that builds on the limitations of Ingress. Compared to Ingress, Gateway API provides:
- Role-oriented resources: Distinct resources for infrastructure providers, cluster operators, and application developers, enabling separation of concerns.
- More expressive routing: Support for advanced traffic management such as path-based and header-based routing, traffic splitting, and TLS configuration.
- Standardization and portability: A Kubernetes community standard supported by multiple vendors, ensuring consistent behavior across implementations.
- Extensibility: Built on Kubernetes CRD extensibility to support new capabilities without breaking the core API.
Migrating to Gateway API with NGINX Gateway Fabric helps future-proof your Kubernetes networking stack, provide a standardized API across implementations, and unlock advanced traffic management features.
The ingress2gateway tool is a Kubernetes SIG project for converting Ingress resources to Gateway API resources. It supports multiple Ingress providers, including NGINX Ingress Controller.
The ingress2gateway tool is a conversion utility that translates Ingress resources to Gateway API equivalents. It is not a complete end-to-end migration solution. You will need to manually review the converted resources, test functionality, and make additional configuration changes as needed for your specific environment.
To convert your existing NGINX Ingress resources to Gateway API resources that work with NGINX Gateway Fabric:
First, install the ingress2gateway tool.
Then run the conversion command for the NGINX provider:
ingress2gateway print --providers=nginx --input-file=<your-ingress-file> > gateway-api-resources.yaml
This tool will analyze your Ingress resources from the input file and output the equivalent Gateway API resources to a file named gateway-api-resources.yaml
. Finally, review the generated Gateway API resources in the output file and apply them to your cluster:
kubectl apply -f gateway-api-resources.yaml
For detailed information about NGINX-specific features and conversion options, see the NGINX provider documentation.