I am configuring NGINX as an ingress on Azure Kubernetes Services (AKS). I will have multiple services I need to expose through the ingress using host based routing rules. One of the services uses HTTPS traffic but on a nonstandard port (5601).
I am using helm to deploy NGINX onto AKS and have modified the helm chart values.yaml file so that the k8s service and associated Azure LB listen on 5601 by defining the service.customPorts parameter. This created a LB based service in Azure that properly showed a rule for traffic on 5601.
I also updated controller.customports which updated the controller deployment to listen on containerport 5601.
After that I defined my normal ingress file which points to the back end service.
Unfortunately the traffic doesn’t flow through however. I checked the pod logs for the nginx controller and it wasn’t even logging receiving the requests on 5601 while all the other services on 443 were working as expected.
I dumped the running nginx config using:
kubectl exec -it -n nginx mypodnamewenthere — nginx -T
and when I look through the details the servers section shows that the nginx software itself is only listening on 80 & 443. What do I need to do to get the actual nginx server software to listen on 5601 for ssl traffic IN ADDITION to 443?
server {
listen 80;listen [::]:80;
listen 443 ssl;listen [::]:443 ssl;
ssl_certificate $secret_dir_path/elasticsearch-tls-secret-nginx-redactedservername;
ssl_certificate_key $secret_dir_path/elasticsearch-tls-secret-nginx-redactedservername;
server_tokens on;
server_name redactedservername;