We’re using the Kong Ingress Controller for routing, and I need to configure routing based on a specific header value. I’ve tried multiple approaches, but none have been successful so far. Any insights into resolving this issue would be greatly appreciated.
{
“apiVersion”:“networking.k8s.io/v1”,
“kind”:“Ingress”,
“metadata”:{
“annotations”:{
“konghq.com/plugins":"route-transformer-advanced”,
“konghq.com/route-by-header":"X-clientID:631899820eff460abc7ebe0cd7da0cbb”
},
“labels”:{
“app”:“api-v1”,
“type”:“mule4”
},
“name”:“api-v1-ingress-c88b5239”,
“namespace”:“demo”
},
“spec”:{
“ingressClassName”:“kong-route”,
“rules”:[
{
“host”:“hostname”,
“http”:{
“paths”:[
{
“backend”:{
“service”:{
“name”:“api-v1”,
“port”:{
“number”:8080
}
}
},
“path”:“/api/v1/”,
“pathType”:“ImplementationSpecific”
},
{
“backend”:{
“service”:{
“name”:“api-v2”,
“port”:{
“number”:8081
}
}
},
“path”:“/api/v2|/api/v1”,
“pathType”:“ImplementationSpecific”
}
]
}
}
]
}
}