如何将GCP CDN与GKE NGINX入口集成

发布于 2025-01-25 22:03:18 字数 177 浏览 3 评论 0原文

我们正在GKE设置中使用NGINX Intress,这意味着GCP使用TCP负载平衡器将流量路由到Kubernetes Nginx Ingress。

我们提供来自Kubernetes的静态内容,并希望为此而从GCP CDN中受益。但是,据我所知,TCP负载平衡器无法设置CDN。我们如何将GCP CDN纳入设置?有什么可能性?

We are using NGINX ingress in our GKE setup, which means that GCP is using TCP load balancer to route the traffic to Kubernetes NGINX ingress.

We serve static content from kubernetes and would like to benefit from GCP CDN for this purpose. However, as far as I know, setting up CDN is not possible with TCP load balancer. How can we incorporate the GCP CDN into the setup? What possibilities there are?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

还如梦归 2025-02-01 22:03:18

正确的是,需要Google云外部HTTP负载平衡器才能利用CDN功能。我唯一能想到的选项:

  1. 用GKE Intress替换Nginx Intress。然后,您可以使用BackendConfig启用CDN。 (我认为您不想这样做)

  2. 在NGINX前使用HTTP(S)负载平衡器代替TCP负载平衡器。您基本上需要配置用于NGINX服务,然后附加HTTP(S)负载平衡器(您要启用负载平衡器的CDN)。

  3. 将静态内容存储在Google云存储存储桶中,将存储桶配置为CDN 的原始服务器。当然,您必须将静态内容的任何链接更新为新的URL。

You are correct that an Google Cloud external HTTP(S) load balancer is required in order to leverage CDN functionality. The only options I can think of:

  1. Replace NGINX ingress with GKE ingress. You can then use a BackendConfig to enable CDN. (I assume you don't want to do this)

  2. Use an HTTP(S) load balancer in front of NGINX in place of the TCP load balancer. You'd basically need to configure a standalone NEG for the NGINX service and then attach an HTTP(S) load balancer (and you'd enable CDN for the load balancer).

  3. Store you static content in a Google Cloud Storage bucket and configure the bucket to be the origin server for CDN. You'd of course have to update any links to the static content to the new URL(s).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文