Service on port 80

11/14/2014

In version 4.0.2 of Google Container Engine I am able to create a service on high ports 8080, 9000, etc but when I try lower ports 80, 81, etc, the service does not work. I have checked the firewall rules and tried with a brand new project without success. I have checked the release notes and there is a bug that prevents two services to reference the same port, but, that's not the case. Any hints of what might happen?

-- Joan Marc Carbo Arnau
google-kubernetes-engine

1 Answer

11/15/2014

You currently cannot bind to a low port (1-1024) because the tcp proxying service runs as an unprivileged user. If you look in your logs you should see an error similar to:

E1030 07:10:54.345547 05091 proxier.go:411] Failed to get a socket for playground: listen tcp 0.0.0.0:80: bind: permission denied

This is why the examples all use high number ports.

You can try port 8080 or 8443 for standard unprivileged http/s ports until GKE supports binding to low numbered ports.

-- Robert Bailey
Source: StackOverflow