Container Port Mapping IP doesn't work on anything but 80

Hello,

I have setup a Rancher Kubernetes cluster. I am able to spin up containers but the problem is, the container port mapping will only work on 80. I have it set to 8080 in the screenshot below and I cannot connec to 10.100.45.239:32767. I can only do a curl on say 10.42.1.6:80 and I get the page. Shouldn’t I have to be alb eot do curl 10.42.1.6:8080? It still seems stuck to 80.

The nginx container presumably listens on (only) 80. So the target port needs to be 80 for it to go anywhere. If you’re talking on the container network (10.42.x.y) then you are talking directly to the container and also use port 80, not the NodePort that was assigned to expose it to the outside world.

So is it not possible to make the NGINX container listen on another port?

Why do you want it to?