Enabling CDN to kubernetes backend through backendconfig doesn't allow custom host and path rules

4/17/2019

Not able to add custom path rules lo Google CDN Loadbalancer

Despite some minor issues like address flapping between custom ingress controller IP and reserved CDN IP, we are implementing CDN for our GKE hosted app following this tutorial (https://cloud.google.com/kubernetes-engine/docs/how-to/cdn-backendconfig)

Almost everything is fine, but when trying to add some path rules, via k8s manifest or Google loadbalancer UI, they take no effect at all, in fact, in the UI case, the rules disappear after 2 minutes...

Any thoughts?

-- Brais Real
google-cloud-platform
google-kubernetes-engine

2 Answers

4/18/2019

Using kubectl describe, in the Events section, I found this warning: Warning Translate 114s (x32 over 48m) loadbalancer-controller error while evaluating the ingress spec: service "xxx-staging/statics-bucket" is type "ClusterIP", expected "NodePort" or "LoadBalancer" So, this is the problem, I will try to change this and post here the resolution.

-- Brais Real
Source: StackOverflow

4/18/2019

Try using "kubectl replace" when dealing with ingress manifest. Google Cloud does not allow updates to ingress after it is created. So in Kubernetes it might look like you make changes but they will not get applied in Google Cloud.

-- Vasily Angapov
Source: StackOverflow