I have a private GKE cluster on GCP which I access via the Google Shell via GCP (not the SDK). I can add my external shell IP the the --master-authorized-networks, but when I logout and log back in this IP address changes, so I would have to do this (and delete the old one) every time I want to make changes to my private cluster via de shell.
How can I access my private cluster via the shell without updating the external IP address in the --master-autorized-networks every time?
Any help is greatly appreciated, thanks.
Google shell is just a VM hosted on a "temporary Server" which is running the code ( taking commands from jquery browser). After some time of being inactive the public ip assigned to that "VM" will change. That's why on the majority of the guides using the Shell the first steps are to authenticate your project.
A "Workaround" would be to create a free instance, and whitelist the IP from that Instance. or, just use the SDK.