2

I have a gRPC server exposed by an ingress. Here are the nginx annotations I use :

nginx.ingress.kubernetes.io/ssl-redirect: "true" 
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"

I am able to request it using grpcurl :

grpcurl -d '<arg>:<value>' <address>:443 api.Service/Request

But when I use a basic golang program :

conn,_ := grpcconn.Dial("<address>:443",grpccon.WithInsecure())

api := apiService.NewServiceClient(conn)

res,err := api.Request(<parameters>)

if err!=nil {
    log.Fatalf("Request failed : %v",err)
}

log.Println(res)

I get the error :

rpc error : code = Unavailable desc = connection closed
Olive
  • 21
  • 1
  • If the server is using TLS, then the client will need to as well. `WithInsecure` may be part of your issue. – drfloob Oct 13 '21 at 18:01

0 Answers0