Every time i take my laptop somewhere new, i have to update the allowlist my new IP from there before i can run the gcloud container clusters get-credentials command before running kubectl commands. I am looking for a way to avoid having to allowlist my local development machine IP. Then i can run the gcloud container clusters get-credentials first and then run kubectl commands like usual. In order to do that, I can add my local development machine IP as an allowlisted entry into my GKE's Master authorized networks, and that should be it.
I want to be able to run kubectl commands to my GKE cluster directly from my local development CLI. Hence, in order to run kubectl commands to my GKE, I first need to SSH into my bastion host by running the gcloud beta compute ssh command then I run the gcloud container clusters get-credentials command to authenticate with GKE, then from there I can run kubectl commands like usual. I have allowlisted my bastion host's IP in the GKE cluster's Master authorized networks section.
I have a bastion host (Compute Engine VM Instance) in GCP. I have a GKE/kubernetes/k8s cluster in GCP.