-2

I want to use Kong as api gateway to allow external applications to interact with the cluster Dapr communicate with my application. I can't find any example.

ben.jamin
  • 217
  • 1
  • 3
  • 6

1 Answers1

0

So, there is no easy way to do this directly. There is a blog post that walks through setting it up with ingress here https://carlos.mendible.com/2020/04/05/kubernetes-nginx-ingress-controller-with-dapr/ The gist of it is that you will set up your ingress controller pods as Dapr services and rewrite/redirect the calls to the dapr sidecar. Be aware of namespaces (the blog glazes over this and installs the ingress in the default namespace which is not common practice) and fully qualify the service name .. Finally, I recommend you apply a rewrite to the invocation of the downstream service. use a regex to get the segments and append the segment at the end of the service invocation URL: HTTP://localhost:3500/v1.0/invoke/YOURSERVICE.ITSNAMESPACE/method/$2 (where $2 is the segment captured from the original path in the ingress

NOTE: I am having issues getting these types of calls to go through the HTTP pipeline components I have downstream, but if you don't need those, then its a great option

ewassef
  • 286
  • 2
  • 13
  • @ben.jamin Did you get this working? I too am trying to get dapr to working inside the Kong Mesh, and service-to-service calls are not working for me. Neither are Kong health checks. – johncougar May 16 '23 at 15:45