RPCs are called via the format “[host]/[service]/[method]” so you can enable service routing by setting the ingress “path” prefix for each of your gRPC services to the fully-qualified service name (e.g. path: “/hello.HelloService/” in the case of the second linked example).
Error invoking method "hello.HelloService.SayHello": failed to query for service descriptor "hello.HelloService": rpc error: code = Internal desc = transport: received the unexpected content-type "application/json; charset=utf-8"
@freesnow The first command should be correct. I think the issue is that grpcurl is trying to call the grpc reflection API but there is no mapping. Can you try also adding another path mapping to your ingress:
Thanks. I am able to call the GRPC service after adding the path mapping above.
Does that mean I need to disable reflection for all the applications I deploy to the cluster if I need to route multiple GRPC services? Or is there another way to route multiple GRPC services with reflection enabled?
Also, after I disabled reflection for the application, I received another error when trying to call the service: failed to query for service descriptor "...": server does not support the reflection API
If your use case specifically requires the reflection API for clients e.g. grpcurl then you could alternatively provide the client with the proto files via the -import-path option so it knows how to convert JSON -> protobuf. However, I think the more typical use cases involves using the generated gRPC client stubs to communicate directly via protobuf.