Versioning a REST API in Kubernetes with Nginx Ingress Controller
An ingress makes it easy to route traffic entering a Kubernetes cluster through a load balancer like NGINX. Beyond basic load balancing and TLS termination, an ingress can have rules for routing to different backends based on paths. The NGINX ingress controller also allows more advanced configurations such as URL rewrites.
In this post, we'll use ingress rules and URL rewrites to route traffic between two versions of a REST API. Each version is deployed as a service (
api-version2). We will route traffic with path
The sample application
We'll be using a super simple ASP.NET Core application. Here's the
Configure() method in
Read more at Anthony Chu