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:
https://service-helloworld-https.blue.gms.sandia.gov:444/
but if I try:
http://service-helloworld-https.blue.gms.sandia.gov:81
it does not work. When I try to curl:
curl -Lv http://service-helloworld-https.blue.gms.sandia.gov:81
I see that "Location" is set to: < Location: https://service-helloworld-https.blue.gms.sandia.gov:443/
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?