1
votes

I am trying to deploy gRPC on GKE, and I followed this tutorial - https://cloud.google.com/solutions/exposing-grpc-services-on-gke-using-envoy-proxy

I got through everything, but I do not seem to be able to run gRPC on golang, while I am able to run it on grpcurl.

Anyone got any ideas?

1

1 Answers

2
votes

I solved it after exploring the inner workings of grpcurl. For anyone who might ever be stuck, here's the difference...

// Not working...
conn, err = grpc.Dial(host, grpc.WithInsecure())

// Working...
var tlsConf tls.Config
tlsConf.InsecureSkipVerify = true
var creds = credentials.NewTLS(&tlsConf)
conn, err = grpc.Dial(host, grpc.WithTransportCredentials(creds))

Previously I used the flag grpc.WithInsecure(). It didn't work, so exploring grpcurl, I found that they were using grpc.WithTransportCredentials() instead, with tls.Config, setting InsecureSkipVerify to true instead. That turned out well.