Welcome! Log In Create A New Profile

Advanced

nginx ingress controller on non-standard ports

July 16, 2020 06:19PM
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?
Subject Author Posted

nginx ingress controller on non-standard ports

beckyjmcd July 16, 2020 06:19PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready