I expect this configuration to proxy calls to “/staging/myservice/” to myservice using as path “/myservice/” however it seems that the property proxy.path is not adding “/myservice/” to the stripped path. For example if I call “/staging/myservice/ui” in the service logs it shows:
2019-06-29 12:05:20.257 CEST 10.56.2.28 - - [29/Jun/2019:10:05:20 +0000] "GET /ui HTTP/1.1" 404 206 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/75.0.3770.90 Chrome/75.0.3770.90 Safari/537.36"
In addition, if this would work I’d like to make the kongingress-api-staging more generic to work with many services ("/staging/mysecondservice/", “/staging/mythirdservice/”, and so on )
To configure any specific setting for a Kong service object, you will need to put the configuration.konghq.com annotation on the Kubernetes service resource (since a k8s service maps to a Kong service).
So, you need to add that annotation myservice service resource.
I can see in Konga how the proxy.path property is not being set even though is defined in the KongIngress resource (but the strip_path property is working ok). If I change the path in the service details section in Konga the redirection works.
According to the documentation, (here), it is enough to use the same name for the Ingress and KongIngress resource. I have however observed the same as @fgsalomon where the strip_path property is applied but not the path property until you add the annotation to the Service, so is the documentation wrong or am I missing something? (I’m rather new to Kubernetes and still haven’t fully grasped the Ingress concept I think).