I tested this using a locally built version of the juju cli. I was using a college's account to debug another issue. My kubeconfig was set up to point to his GKE cluster.
I could use add-k8s to register access to that cluster.
$ juju add-k8s gketest
This operation can be applied to both a copy on this client and to the one on a controller.
No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one.
k8s substrate "gce/europe-west1" added as cloud "gketest".
You can now bootstrap to this cloud by running 'juju bootstrap gketest'.
--
This looks like a GKE cluster set up issue, related to Autopilot being enabled. People seem to be complaining about this issue independent of juju, eg
It seems plausible to me that if you have configured your GKE cluster to ask Google to manage your configuration for you by enabling AUto Pilot, then it may well result in it denying access to external parties to perform certain operations. Juju needs to create a system service account to use to delegate access to the cluster. Can you retry with Auto Pilot turned off?
I tested this using a locally built version of the juju cli. I was using a college's account to debug another issue. My kubeconfig was set up to point to his GKE cluster.
I could use add-k8s to register access to that cluster.
$ kubectl config get-contexts k8s-dev_ europe- west1-c_ ubuntu- 21713 gke_neppel- k8s-dev_ europe- west1-c_ ubuntu- 21713 gke_neppel- k8s-dev_ europe- west1-c_ ubuntu- 21713
* gke_neppel-
$ juju add-k8s gketest
This operation can be applied to both a copy on this client and to the one on a controller.
No current controller was detected and there are no registered controllers on this client: either bootstrap one or register one.
k8s substrate "gce/europe-west1" added as cloud "gketest".
You can now bootstrap to this cloud by running 'juju bootstrap gketest'.
--
This looks like a GKE cluster set up issue, related to Autopilot being enabled. People seem to be complaining about this issue independent of juju, eg
https:/ /github. com/argoproj/ argo-cd/ issues/ 13054
It seems plausible to me that if you have configured your GKE cluster to ask Google to manage your configuration for you by enabling AUto Pilot, then it may well result in it denying access to external parties to perform certain operations. Juju needs to create a system service account to use to delegate access to the cluster. Can you retry with Auto Pilot turned off?