Kong sidecar requires TCP service and routing

Hi there,
I’m trying to setup an http service with the kong sidecar in kubernetes (AKS), basically the same as https://github.com/Kong/kong-mesh-dist-kubernetes but with HTTP instead of raw TCP.

It seems that in order to get communication between the sidecar and the app working, I have to have a TCP routing like in the example with source=0.0.0.0/0 (https://github.com/Kong/kong-mesh-dist-kubernetes/blob/master/docker-entrypoint-kong-config.sh).

When I’m trying to use HTTP routing instead (I’ve tried all: path/host/method only), it fails on:

│ 2019/08/27 13:27:45 [error] 35#0: *856 stream [lua] handler.lua:905: before(): no Route found with those values while prereading client data, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:7000 │
│ 2019/08/27 13:27:45 [info] 35#0: *857 client xxx.xxx.xxx.xxx:38818 connected to 0.0.0.0:7000

where xxx.xxx.xxx.xxx is IP of kong ingress node.

As of now I’m using kong version 1.2, in current 1.3 it seems that sidecars are broken, mentioned example does not work even with TCP routing.

TCP routing which does work:

curl -i -X PUT
–url host:port/services/service-b
–data ‘host=serviceb.test.svc.cluster.local’
–data ‘protocol=tcp’

curl -i -X POST
–url host:port/services/service-b/routes
–data ‘name=service-b’
–data ‘sources[1].ip=0.0.0.0/0’
–data ‘protocols=tcp’

Tested HTTP routings:
curl -i -X PUT
–url host:port/services/service-b-http
–data ‘url=http://serviceb.test.svc.cluster.local:8080’

curl -i -X POST
–url host:port/services/service-b-http/routes
–data ‘name=service-b-http’
–data ‘paths=/test’
–data ‘protocols=http’

curl -i -X POST
–url host:port/services/service-b-http/routes
–data ‘name=service-b-http’
–data ‘methods=GET’
–data ‘protocols=http’

curl -i -X POST
–url host:port/services/service-b-http/routes
–data ‘name=service-b-http’
–data ‘hosts[]=test’
–data ‘protocols=http’

I’ve created an issue for this: https://github.com/Kong/kong/issues/4975


© 2018 Kong Inc.    Terms  •  Privacy  •  FAQ