You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup this ingress controller on AWS. When I set it up with the service of type LoadBalancer, AWS automatically creates an AWS load balancer mapped to it's node ports, both for HTTP and HTTPS.
This works great if my SSL certificate is stored in the cluster and Nginx is using it directly to terminate SSL. However, I'd like to go a step further. AWS can store my SSL certificate and terminate SSL on the load balancer, before the communication reaches the k8s cluster. That's what I'd ike to do, because I can benefit from having my certificate managed by AWS directly.
The problem is, right now there is no way to make this work. AWS maps it's load balancer to the ports of the k8s service based on the configuration of the ports in the service. For example, if the configuration is this:
The AWS load balancer would map it's HTTP port to the HTTP node port of this service and HTTPS port to HTTPS port. If however I setup SSL termination on the AWS load balancer, it's HTTPS port is still mapped to HTTPS port of the k8s service. The result is this:
As you can see, Nginx receives unencrypted traffic on port 443 which obviously doesn't work. What I want instead is the unencrypted traffic to be rerouted to port 80 of Nginx. Unfortunatelly, that can't be achieved with the current state of things.
Solution
I discussed this in this ServerFault thread. As you can see, I got a response with a suggestion, that the Nginx service should have it's ports set like this:
Issue
I'm trying to setup this ingress controller on AWS. When I set it up with the service of type LoadBalancer, AWS automatically creates an AWS load balancer mapped to it's node ports, both for HTTP and HTTPS.
This works great if my SSL certificate is stored in the cluster and Nginx is using it directly to terminate SSL. However, I'd like to go a step further. AWS can store my SSL certificate and terminate SSL on the load balancer, before the communication reaches the k8s cluster. That's what I'd ike to do, because I can benefit from having my certificate managed by AWS directly.
The problem is, right now there is no way to make this work. AWS maps it's load balancer to the ports of the k8s service based on the configuration of the ports in the service. For example, if the configuration is this:
The AWS load balancer would map it's HTTP port to the HTTP node port of this service and HTTPS port to HTTPS port. If however I setup SSL termination on the AWS load balancer, it's HTTPS port is still mapped to HTTPS port of the k8s service. The result is this:
As you can see, Nginx receives unencrypted traffic on port 443 which obviously doesn't work. What I want instead is the unencrypted traffic to be rerouted to port 80 of Nginx. Unfortunatelly, that can't be achieved with the current state of things.
Solution
I discussed this in this ServerFault thread. As you can see, I got a response with a suggestion, that the Nginx service should have it's ports set like this:
This works, but the current helm chart doesn't allow to configure this. It's hardcoded there:
It would be nice if there was some way of setting this. I can suggest something like
which is the most obvious solution. The value would default to 443 so it's backwards compatible.
The text was updated successfully, but these errors were encountered: