nginx ingress controller on non-standard ports

beckyjmcd nginx-forum at
Thu Jul 16 22:19:18 UTC 2020

I have deployed the nginx ingress controller to my kubernetes cluster as a
daemonset.  In the deployments/daemon-set/nginx-ingress.yaml file, I
modified the container spec and set:
hostPort: 81 (for http)
hostPort: 444 (for https)

Likewise in the deployments/service/nodeport.yaml, I set
port: 81
targetPort: 80
port: 444
targetPort: 443

:I could not get one ingress resource to route to both http and https
because http redirected to https on port 443 but I have something else
running on that port.  I can get my example service to work with https, if I
explicity specify:

but if I try:

 it does not work.  When I try to curl:
curl -Lv

I see that "Location" is set to:  < Location:

so http requests are being redirected to https on port 443.  But, my ingress
controller listens on 444.  How can I update my ingress resource to redirect
to port 444?

Posted at Nginx Forum:,288738,288738#msg-288738

More information about the nginx mailing list