Docker Community Forums

Share and learn in the Docker community.

Connecting to port 80 in K8s (macOS)

I’m trying to use the Kubernetes subsystem in Docker Desktop, and attempted to include the NGINX ingress controller using the instructions here: Installation Guide - NGINX Ingress Controller.

Everything looks like correct after deploying my pods and services, but when I try to access the web UI on port 80, it connects but just hangs and eventually times out. To try to eliminate some misconfiguration of the ingress as the issue, I removed that and changed the web UI service to LoadBalancer, still on port 80. However, I got the same result. As a sanity check, I changed the external port to 8080 and it then worked. So I’m guessing it has something to do with macOS security and trying to run something on a port below 1024? Note: I was also able to exec into the ingress controller pod and connect to the web UI service on port 80 on its cluster IP address.

Should I expect Docker Desktop/K8s to be able to work on port 80 or do I have to somehow run something as root?

Environment:
Docker Desktop: v4.1.1 (69879)
macOS: 11.6.1

Thanks in advance.

Just to close this off, it must be the port # and macOS security … as a test, I copied the deployment YAML from the link above for the NGINX ingress controller, and modified it to use port 8080 instead of 80, reverted my app component deployments back to ClusterIP and using the ingress, and the app works fine over 8080.

So still not sure how/if one could run Docker Desktop K8s and use port 80, but this will suffice for me for now.