Skip to content
Kong Docs are moving soon! Our docs are migrating to a new home. You'll be automatically redirected to the new site in the future. In the meantime, view this page on the new site!
Kong Logo | Kong Docs Logo
  • Docs
    • Explore the API Specs
      View all API Specs View all API Specs View all API Specs arrow image
    • Documentation
      API Specs
      Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong AI Gateway
      Multi-LLM AI Gateway for GenAI infrastructure
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      AI's icon
      AI
      Govern, secure, and control AI traffic with multi-LLM AI Gateway plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Ingress Controller
2.11.x
  • Home icon
  • Kong Ingress Controller
  • Concepts
  • Using Expression Based Router
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • unreleased
  • 3.4.x (latest) (LTS)
  • 3.3.x
  • 3.2.x
  • 3.1.x
  • 3.0.x
  • 2.12.x (LTS)
  • 2.11.x
  • 2.10.x
  • 2.9.x
  • 2.8.x
  • 2.7.x
  • 2.6.x
  • 2.5.x (LTS)
  • Introduction
    • FAQ
    • Version Support Policy
    • Stages of Software Availability
    • Changelog
  • Concepts
    • Architecture
    • Custom Resources
    • Deployment Methods
    • Kong for Kubernetes with Kong Gateway Enterprise
    • High-Availability and Scaling
    • Resource Classes
    • Security
    • Ingress Resource API Versions
    • Gateway API
    • Expression Based Router
  • Deployment
    • Kong Ingress on Minikube
    • Kong for Kubernetes
    • Kong Enterprise for Kubernetes (DB-less)
    • Kong Enterprise for Kubernetes (DB-backed)
    • Kong Ingress on AKS
    • Kong Ingress on EKS
    • Kong Ingress on GKE
    • Admission Webhook
    • Installing Gateway APIs
  • Guides
    • Getting Started with KIC
    • Upgrading from previous versions
    • Upgrading to Kong 3.x
    • Using Kong Gateway Enterprise
    • Getting Started using Istio
    • Using Custom Resources
      • Using the KongPlugin Resource
      • Using the KongIngress Resource
      • Using KongConsumer and KongCredential Resources
      • Using the TCPIngress Resource
      • Using the UDPIngress Resource
    • Using the ACL and JWT Plugins
    • Using cert-manager with Kong
    • Allowing Multiple Authentication Methods
    • Configuring a Fallback Service
    • Using an External Service
    • Configuring HTTPS Redirects for Services
    • Using Redis for Rate Limiting
    • Integrate KIC with Prometheus/Grafana
    • Configuring Circuit-Breaker and Health-Checking
    • Setting up a Custom Plugin
    • Setting up Upstream mTLS
    • Exposing a TCP/UDP/gRPC Service
      • Exposing a TCP Service
      • Exposing a UDP Service
      • Exposing a gRPC service
    • Using the mTLS Auth Plugin
    • Using the OpenID Connect Plugin
    • Rewriting Hosts and Paths
    • Preserving Client IP Address
    • Using Kong with Knative
    • Using Multiple Backend Services
    • Using Gateway Discovery
    • Routing by Header
  • References
    • KIC Annotations
    • CLI Arguments
    • Custom Resource Definitions
    • Plugin Compatibility
    • Version Compatibility
    • Supported Kong Router Flavors
    • Troubleshooting
    • Kubernetes Events
    • Prometheus Metrics
    • Feature Gates
    • Supported Gateway API Features
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Install Kong Ingress Controller with a Kong Gateway expression-based router
    • Prerequisites
    • Instructions
  • Kubernetes resource support
  • Unsupported methods of overriding routes
    • Other unsupported features and breaking changes
You are browsing documentation for an older version. See the latest documentation here.

Using Expression Based Router

This feature is released as a tech preview (alpha-quality) and should not be depended upon in a production environment.

The expression-based routers, introduced in Kong Gateway 3.0, have higher performance and allow more precise priority specification than the traditional router. By using the expression-based router, Kong Ingress Controller can reduce most of generated routes with regular expression match on path, and therefore improve the performance of the router.

This page explains how Kong Ingress Controller can use the expression-based router, and the supported features and limitations of the current version.

Install Kong Ingress Controller with a Kong Gateway expression-based router

To install Kong Ingress Controller with a Kong Gateway expression-based router, you must configure environment variables in the container of Kong Ingress Controller and Kong Gateway.

Prerequisites

  • Kong Ingress Controller 2.10.x or later
  • Kong Gateway 3.0.x or later

Instructions

For Kong Ingress Controller, you must enable ExpressionRoutes and CombinedRoutes (enabled by default) so Kong Ingress Controller can translate Kubernetes resources to expression-based Kong Gateway routes. For Kong Gateway, you must configure KONG_ROUTER_FLAVOR for expressions to use expression-based router.

You can use the following values.yaml to install Kong Ingress Controller using the expression-based router by helm:

image:
  repository: kong
  tag: "3.3" # 3.0 or later

env:
  database: "off"
  router_flavor: "expressions" # sets KONG_ROUTER_FLAVOR to "expressions"

ingressController:
  enabled: true
  image:
    repository: kong/kubernetes-ingress-controller
    tag: "2.10" # 2.10 or later
  env:
    feature_gates: "ExpressionRoutes=true" # enables the "ExpressionRoutes" feature gate

Then, use Helm to install Kong Gateway:

  helm upgrade --install controller kong/kong -n kong --create-namespace -f values.yaml

Kubernetes resource support

The following table displays which Kubernetes resources are supported when translating to expression-based routes is enabled in Kong Ingress Controller:

Kubernetes resource Supported?
Ingress ✅  
HTTPRoute ✅  
GRPCRoute in gateway APIs ✅  
knative.Service ❌  
TCPIngress ❌  
UDPIngress ❌  
TCPRoute ❌  
TLSRoute ❌  
UDPRoute ❌  

Unsupported methods of overriding routes

Because Kubernetes objects can’t fully express Kong Gateway configuration specifications, Kong Ingress Controller provides methods to override services, routes, plugins, consumers, and other objects in Kong Gateway configurations after translating from Kubernetes objects. These methods include overriding using the KongIngress resource and annotations of resources. When the expression-based router is enabled, some of the methods of overriding routes in Kong Gateway configurations after translating are not supported:

  • Overriding routes in Kong Gateway configurations using KongIngress isn’t supported when expression routes is enabled. The route fields of KongIngress resources will be ignored when Kong Ingress Controller translates Kubernetes resources to expression based routes.
  • You can’t override Ingress with the konghq.com/path_handling and konghq.com/regex_priority annotations because the path_handling and regex_priority fields are not supported in Kong Gateway route configurations when Kong Gateway is running the expressions router.
  • For HTTPRoute and GRPCRoute, the konghq.com/path_handling and konghq.com/regex_priority annotations aren’t supported for the same reason. Besides this, the konghq.com/host_aliases, konghq.com/methods, and konghq.com/headers annotations can’t be used to override hosts, methods, and headers.

Other unsupported features and breaking changes

  • HTTPS redirect isn’t supported by the Kong Gateway expression-based router yet.
  • The current translator assigns the same priority to all translated routes. When there are multiple route that match the request, the chosen route may be different than if you were using a traditional router.
  • The standard of regular expressions changed to regex in Rust for the expression-based router (instead of PCRE2 in the traditional router), so previously valid regex may become invalid if you enable the expression-based router. For example, a non-escape character after \ like \/, \j becomes invalid in the regex of the expression-based router.
Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    Powering the API world

    Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

    • Products
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • Product Updates
      • Get Started
    • Documentation
      • Kong Konnect Docs
      • Kong Gateway Docs
      • Kong Mesh Docs
      • Kong Insomnia Docs
      • Kong Konnect Plugin Hub
    • Open Source
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kong Community
    • Company
      • About Kong
      • Customers
      • Careers
      • Press
      • Events
      • Contact
  • Terms• Privacy• Trust and Compliance
© Kong Inc. 2025