Does anyone know how to connect a local instance of kubectl
to a Google Kubernetes Engine (GKE) cluster, without using the gcloud
tool locally?
So I have created this tool called gke-kubeconfig to do so. I basically reverse engineered gcloud and did the same. It requests a short term token first and then use it to get the cluster data and create kube config.
You need to make sure that the token does not expire while you are using the config file, it currently expires after 1 hour so usually it shouldn't be a problem.
I have also created mie00/gke-kubeconfig to use in my CI pipeline.