"404 not found" when trying to make calls to a GRPC server (on GKE) from web client (grpc-web)

3/1/2019

so I've deployed a GRPC service to GKE and confirmed it works by connecting and making calls in python... but my goal is to create a front end web app rather than just use python.

So I have a simple React app that uses grpc-web to connect, but I'm getting a "404 (Not Found)" error when making ANY api calls.

Here is the yaml file I'm using to deploy the service.

At first I was getting CORS errors but fixed that by adding lines 48-52 and creating a new service that serves HTTP1.

What might be causing a 404 error?

-- Diericx
google-kubernetes-engine
grpc
grpc-web
kubernetes

1 Answer

3/6/2019

For gRPC-Web to work, you need to have an Envoy endpoint in front of your gRPC service. In particular, you need to enable the gRPC-Web filter on your envoy.yaml config like this: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/envoy.yaml#L35-L38

-- Stanley Cheung
Source: StackOverflow