Closed Zebradil closed 6 months ago
Did you get it to work? I have the same issues
I also have to authenicate every time against Google when calling switch.
And I have no idea what a gcp store is and what ID is meant by that description: id: id-only-required-if-there-are-more-than-one-store
Ok, got it to working. Specific API has not been enabled. You can trigger this by executing
gcloud projects list
API [cloudresourcemanager.googleapis.com] not enabled on project. Would you like to enable and retry (this will take a few minutes)? (y/N)? y
After that, it just works :-)
Closed as seems to be a user issue.
@danielfoehrKn it is not a user issue. The issue @dfineSvenFlock had was something different. The original problem is still reproducible.
@Zebradil do you use multiple gcloud configurations and is gke enabled / are there gke clusters in your default config?
had the same, solved this by setting my default gcloud profile to a project that has a gke cluster. Wouldn't really call it a bug, but a "nice to be documented" or improvement kind of thing
@Zebradil do you use multiple gcloud configurations and is gke enabled / are there gke clusters in your default config?
No, I always used a single account. I'm not sure what you mean by "gke clusters in the default config", but there is nothing apart from my account email. Setting a default project is not an option, as I don't have one that can be set as a default.
My solution to this issue was to stop using the gke store completely. Instead I use another tool to generate kubeconfigs for all GKE clusters I have access to and use kubeswitch just to switch contexts from the filesystem store.
On my side, i've faced to the same issue without knowing why, i've did this trick on my .zshrc
export CLOUDSDK_CORE_PROJECT=my-project-with-gke-cluster
This variable is used by gcloud CLI to know i which project the gcloud CLI should process the command ;)
Prerequisites:
Steps to reproduce:
switch
(Google Cloud Authorization opens in a web browser)switch
Result:
Expected
A list of GKE clusters. There are definitely some projects:
And some GKE clusters:
Additional information
Kubeswitch version info:
Gcloud version info: