K8S Gateway API and middlewares

We are moving our infrastructure to AKS, and we are evaluating Traefik as a gateway controller, for this I have couple of questions:

  • Is using the new Gateway API instead of Ingress controller a safe bet? We want to be able to mirror traffic, redirects, etc.. things that can only be expressed using annotation when using Ingress.
    • I also think that using the Gateway API will make our setup more technology agnostic and allows us to experiment with other Gateways controllers
  • Is it possible to use Middlewares when using Gateway API? If so, how?
  • Is it possible to have custom middlewares?


Hello @Segflow

Thanks a lot for using Traefik.

First of all, please note that the implementation of the Kubernetes Gateway API is still the experimental feature in Traefik. Please also note that the latest Gateway API release is 0.3.0 is v1Alpha1. Thus, those aspects should be taken into account while considering using Gateway in a production environment.

You are absolutely right in saying that Gateway API is technology agnostic and provides standardization, roles and separation. It doesn't rely on annotations strictly designed for a specific Ingress controller giving us the possibility to test different solutions without changing the existing configuration.

However, for now, I would encourage you to try Kubernetes IngressRoute. You can configure mirroring, weighted round-robin, stickiness, redirects, middlewares and many more using our custom resources. I think this is the most recommended way for today.

Please let us know if you have any other questions concerning a specific feature or its implementation.


1 Like