-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ingress-nginx: 400 Bad Request The plain HTTP request was sent to HTTPS port #368
Comments
If I change the backend protocol of 443 port of the load balancer, from HTTP to HTTPS it's working as expected. |
👋 are you saying that the annotations above configured the LB to use HTTP for port 443? That's odd, it shouldn't be the case. 🤔 Let me know for sure and I'll try to reproduce. |
Yeah. Oops looks like I forgot to add screenshot. |
That's not correct. It should be: HTTPS on port 443 -> HTTPS on port 30811 Now if you create test ingress resource on k8s with your configuration and try to access it using https. You'll get the error. |
HTTPS-to-HTTPS on the target/backend part of the request path is currently not supported. #367 tracks work to support this, though I'd be curious to learn what your specific use case is given that the backend traffic runs through the VPC. Understanding this better would help prioritizing the request. Thanks! |
I mean I don't mind having http on nginx and https on DO LB. But problem is it's giving error 400. Did you deploy basic Ingress to confirm the error? If it didn't give 400 error I don't mind. I don't have specific requirement. That's why I'm setting https on backend, because it works. |
@shinebayar-g I did not deploy an Ingress, though I did test it by sending traffic directly from the LB to a default Nginx instance. I also received a 400 initially, but that was because the default Nginx configuration does not expect Proxy Protocol. Once I flipped the Proxy Protocol annotation to Just to be sure, is Proxy Protocol correctly set up on your Nginx? And if so, are you testing things by hitting the LB address from outside the cluster (routing to the public LB IP address from inside the cluster is not supported due to Kubernetes limitations)? |
Do we need proxy protocol? (I thought it only needed if we have HTTPS backend? (nginx) If HTTPS backend isn't supported, then we may don't need this? If that's the case, I don't know why it's working for me? I don't fully know what it does). It was configured on by default. |
Proxy Protocol is often used to relay the source IP address to the target. (See also DO's blog post when we added support.) Depending on whether that's something you want, you may or may not want to enable the option. I'd suggest you first try without proxy protocol (i.e., disable both the Helm option and LB annotation) and see if it works in general. |
Closing since the issue hasn't been updated in a while, assuming things have resolved. |
I'm getting
400 Bad Request The plain HTTP request was sent to HTTPS port
error with Kubernetes ingress-nginx.my nginx config:
My Ingress config:
What am I missing?
The text was updated successfully, but these errors were encountered: