Reputation: 393
We have our pods running in GKE private cluster with NO global control plane access. We have one bastion host which is used to connect to this private cluster and kubectl apis can be accessed from there.
user --> bastion (kubectl and authorised to use cluster) -->GKE private cluster
One issue in this architecture is, we need to port-forward to the app pods in the private cluster, however as the bastion host is different than our localhost (VM where browser), we can not access the apps with port-forward. For the same reason, forwarding is not working from Gcloud shell as well.
Do we have any suggestions from GKE for port-forwarding use cases in private cluster paradigm. We do not want to provision RDP instance and add that to authorised network just for port forwarding use case.
we have refereed to the doc , but did not get info on this.
https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters
Upvotes: 1
Views: 998
Reputation: 30083
When you are doing port forwarding on GCP console you can do the web preview port-forward there also.
Use the web preview option when you are trying the port-forwarding from the console.
It will redirect you to a web preview and show you output on port that you are forwarding.
Read more at : https://cloud.google.com/shell/docs/using-web-preview
Upvotes: 1