How to create a Google CDN for a GKE service
Asked Answered
W

1

7

I've deployed a wordpress site on GKE (kubernetes) and I can access my Site from the internet like this mysite.test.com and works like a charm. Now I want to use Google CDN to accelerate access. I've tried using an Ingress resource but I would like to do it using a Load Balancing on the Networking tab on Google Console. What steps do I need to take?

Weather answered 18/9, 2016 at 21:17 Comment(2)
Keep in mind that WordPress most probably won't follow the CloudCDN caching guidelines: cloud.google.com/cdn/docs/cachingRichey
From my research, as of now, nginx-ingress can't be used with CloudCDN. Nginx relies on a level 4 (TCP) load balancer, and not a level 7 (HTTP) load balancer, necessary to integrate with CloudCDNIschium
W
13

I just wrote a post about using the Google CDN with Kubernetes:

https://medium.com/@chees/code-cooking-kubernetes-e715728a578c

The important parts:

  • Use a service with --type=NodePort
  • Create an ingress for that service
  • Use --enable-cdn on the created backend-service (you can do this from the command line or through the networking tab on console.cloud.google.com)
Walkway answered 25/1, 2017 at 17:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.