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.
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!