ingress-nginx: nginx: HTTP->HTTPS redirect does not work
https://github.com/kubernetes/ingress/tree/master/controllers/nginx#server-side-https-enforcement says that the HTTP->HTTPS redirect should be enabled by default if a TLS config is given for the Ingress.
For some reason that does not work for me. I am out of ideas why this might be the case. Any suggestions?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 28 (9 by maintainers)
If you’re wondering why this broke again after
0.9.0-beta.18, then you’ll need to update your annotations tonginx.ingress.kubernetes.io/force-ssl-redirect: "true".Also note that the redirect changed from a
301to a308permanent redirect!ingress.kubernetes.io/force-ssl-redirect: "true"works for me.@aledbf That image worked!
Thanks
@wstrange please use the image
quay.io/aledbf/nginx-ingress-controller:0.89changing the annotation to false
ingress.kubernetes.io/ssl-redirect: "false"@DanHoerst waiting bprashanth to publish https://github.com/kubernetes/ingress/pull/303
ingress.kubernetes.io/force-ssl-redirect: "true"works for me too.yes
@aledbf I’m OK with closing
Here is an example:
This is on minikube, using gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.3