0
votes

I am trying to run a gRPC service written in Golang inside Kubernetes. I am deploying the service (without any SSL). The Kubernetes also has nginx running with flag --enable-ssl-passthrough. I have a Go client which tries to call the gRPC service (without TLS) and I am getting the following error:

2020/03/20 18:12:54 rpc error: code = Unavailable desc = connection closed
exit status 1

When I do kubectl exec into the gRPC service pod and run the client code inside the pod (with address: localhost:<port>) then I am getting correct output. But I am not able to communicate with the gRPC service from outside.

1
Please share your yaml from pod and services. From where you are trying to communicate? Are you using pod ip, service ip, service name? - Mr.KoopaKiller
Try sending a simple TCP package with netcat to the server. That should at least help you determine wether traffic can be routed to the cluster Ingress Gateway. - davidmontoyago
Thanks for the help! The communication is working fine now. It needed to communicate over TLS (because nginx controller was expecting that). - Chintan Rajvir

1 Answers

1
votes

The nginx controller pod expected that the service it is redirecting to, works on TLS. Because I had not enabled secure gRPC inside server/client, the communication was not passing forward from the controller. I enabled TLS/SSL inside service and made secure communication from client and so it is working fine now!