Turns out the problem was that I had mistakenly created 2 routes:"weather" and "weather-route":
PS D:\kong-kubernetes> kubectl get ingressNAME CLASS HOSTS ADDRESS PORTS AGEweather kong * 127.0.0.1 80 3h9mweather-route kong * 127.0.0.1 80 25m
Therefore, when editing "weather-route", even if I set konghq.com/strip-path
to 'false'
, the other route rule had it set to 'true'
and was getting applied earlier, causing the request to fail.
Removing it fixed the issue:
kubectl delete ingress weather
PS D:\kong-kubernetes> kubectl get ingressNAME CLASS HOSTS ADDRESS PORTS AGEweather-route kong * 127.0.0.1 80 25m
HTTP request:
PS D:\kong-kubernetes> curl -i 127.0.0.1:80/weather/London{"cityName": "London (GB)","temperature": {"actual": 14.53,"min": 12.64,"max": 15.76 },"humidity": 79,"windSpeed": 5.66,"description": "scattered clouds","iconURL": "http://openweathermap.org/img/wn/03d@2x.png"}
A special thanks to Botje for making me notice the first most important issue :)