Have pods and service running, in a specific namespace (not kong) and accessible by the clusterIP with:
curl -k https://10.102.149.237:8082/api/v5/comments
The code in the pods expect the path (api/v5/comments).
DNS in k8s is fine, with the above address resolving for the dns name
comments-business-api-service.comments-api
where ‘comments-api’ is the namespace, and that resolves to the address from the curl above.
And the Service expects requests on port 8082, as shown in the curl above.
So all is well there.
BUT, the http route, set up like this:
kind: HTTPRoute
metadata:
name: comments-api-http-route
namespace: comments-api
annotations:
# konghq.com/strip-path: 'true'
spec:
parentRefs:
- name: kong
hostnames:
- 'api.executeinc.com'
rules:
- matches:
- path:
type: PathPrefix
value: /api/v5/comments
backendRefs:
- name: comments-business-api-service
kind: Service
port: 8082
Intent of this route will be to have a number of microservices on this same host, with different paths that will differentiate routing.
I have the strip-path removed, because I think that means that I want to pass through the api/v5/comments through.
When trying to hit it:
curl -vk https://api.somedomain.com/api/v5/comments
I get
"failure to get a peer from the ring-balancer"
Difficult to find good docs it seems on this httproute config, any thoughts out there? I’m sure I’m doing something stupid. Thanks