grpc k8s listen giving "too many colons"

7/23/2020

In my Go GRPC Server, I am calling net.Listen("tcp", "9901") and I get the following error running in k8s: level=fatal msg="Listen Failed: listen tcp: address tcp://10.101.156.95:9901: too many colons in address

I am not sure how the address is being filled in other than k8s magic. It is the loadbalancer IP for the pod though.

I can not figure where the too many colons are coming from.

-- Donald French
grpc
kubernetes

1 Answer

7/23/2020

When using in k8s the address/port should be left "", not the port you would use if running standalone. Doing that solved that problem.

-- Donald French
Source: StackOverflow