kubernetes nodeport expose service error

1/29/2018

I am exposed the service mongodb in nodePort but I cannot access that link. Connection was reset error:

$ curl http://192.168.99.102:32292
curl: (56) Recv failure: Connection was reset

$ kubectl.exe get services
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)           AGE
kubernetes   ClusterIP   10.0.0.1     <none>        443/TCP           4d
mongodb      NodePort    10.0.0.213   <none>        27017:32292/TCP   7m
-- K.Boopathi 17
kubernetes
mongodb

1 Answer

1/29/2018

You can't connect to the port 27017 via HTTP.
Try this telnet 192.168.99.102 32292.

-- vkozyrev
Source: StackOverflow