Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found

export USE_GKE_GCLOUD_AUTH_PLUGIN=True
source ~/.bashrc

gcloud --quiet components install gke-gcloud-auth-plugin
gke-gcloud-auth-plugin --version

kubectl apply -f kubernetes.yml
// Unable to connect to the server: getting credentials: exec: executable gke-gcloud-auth-plugin not found. It looks like you are trying to use a client-go credential plugin that is not installed.

I already tried everything. I am out of options. I followed every step of the update in the documentation. Nothing seems to work.

My case may not be identical to yours, but what worked for me was checking the path defined in my kubectl config.

I noticed that for contexts which did allow auth, the path was specified as /opt/homebrew/share/google-cloud-sdk/bin/gke-gcloud-auth-plugin and in the one case where auth was not working (i.e I was getting the error you also received) the path was simply gke-gcloud-auth-plugin.

This can be found in the users section of the config under command.

hth.