Manual control of GKE generated forwarding rule

12/11/2018

I'm attempting to migrate from one infrastructure to another, both of which are in the same GCP project and region. I want the switch to be faster than I can rely on with DNS propagation, so was planning to change the https-proxy-target of the forwarding-rule that has the IP the A record is currently pointing at. This works, for a minute, but then the change gets reverted.

I'm fairly certain this is occurring because the forwarding rule and original https-proxy-target was generated by Kubernetes (the original infrastructure is on Google's GKE). Is there a way to take over control of a resource, or otherwise accomplish having the IP point to a new target in a way that is still easy to revert?

-- Chris
google-cloud-platform
kubernetes

1 Answer

12/11/2018

I think that you can get information for the related kubernetes object in GKE by looking for the description field in the cloudshell invoking commands given below or via Google Cloud Platform Console, reaching Load balancing page as described here.

Describe forwarding-rules:

$ gcloud compute forwarding-rules describe <BACKEND_SERVICE_NAME> --region <REGION>

Describe target-http-proxies:

$ gcloud compute target-http-proxies describe <TARGET_PROXY_NAME>

Result might be something like this:

description: '{"kubernetes.io/service-name":"..............."}'

-- mk_sta
Source: StackOverflow