Is there a way to connect Cloud Builld through proxy to GKE priivate cluster?

782 Views Asked by At

I'm looking for a way to connect Cloud Build through proxy instance (GCP VM) to be able to deploy to GKE private cluster.

I have bastion host with IAP and tinyproxy installed, and I'm able to connect into it with gcloud ssh, with -- -L8888:locallhost:8888, and then from another terminal window: HTTPS_PROXY=localhost:8888 kubectl get pod, but I'm looking for a way without ssh, as Cloud Build is not able to connect with this way.

I was also trying to do it from gcloud compute start-iap-tunnel to tunnel connection on port 8888 to bastion, from also localhost:8888, but then I get "access denied" from kubernetes API (with the same kubeconfig), and it is very confusing for me.

Can someone help me with this problem?

Thanks in advance.

0

There are 0 best solutions below