简体   繁体   English

Kubernetes 入口重定向到 https

[英]Kubernetes ingress redirect to https

I am deploying my apps to the kubernetes and accessing it via ingress controller, I have configured nginx ingress controller as well as GKE ingress controller.我正在将我的应用程序部署到 kubernetes 并通过入口控制器访问它,我已经配置了 nginx 入口控制器以及 GKE 入口控制器。 Nginx for web app deployments and GKE for api.用于 Web 应用程序部署的 Nginx 和用于 api 的 GKE。 Now i have an issue on GKE ingress for https.现在我在 GKE Ingress for https 上遇到了问题。 I have configured google managed SSL on LB.我已经在 LB 上配置了谷歌管理的 SSL。 and it's opening fine for https, But i want to redirect all the http requests to https.它对 https 开放,但我想将所有 http 请求重定向到 https。

Same things are working in Nginx ingress, I want it for GKE ingress.同样的事情在 Nginx 入口中工作,我希望它用于 GKE 入口。

GCE-Ingress doesn't handle redirection or rewriting at the L7 layer directly yet. GCE-Ingress 还没有直接在 L7 层处理重定向或重写。 Here is the Issue on github这是github上问题

If your LB is Global Load Blaancer you add a new forwarding rule to handle the http request.如果您的 LB 是 Global Load Blaancer,您可以添加新的转发规则来处理 http 请求。 Refer this post参考这个帖子

Redirecting http to https in Google Cloud 在 Google Cloud 中将 http 重定向到 https

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM