[Solved] gke-gcloud-auth-plugin, was not found or is not executable

gke-gcloud-auth-plugin, was not found

If you have installed gcloud CLI and setup a GKE cluster. However, when you try to connect to the GKE cluster using gcloud command you get the following error.

CRITICAL: ACTION REQUIRED: gke-gcloud-auth-plugin, which is needed for continued use of kubectl, was not found or is not executable. Install gke-gcloud-auth-plugin for use with kubectl by following https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin

This issue is caused due to the authentication changes in GKE v1.26. To rectify this issue you need to install the kubectl gke-gcloud-auth-plugin so that you can use kubectl to connect to GKE clusters.

gke-gcloud-auth-plugin is based on the official client-go credential plugins that is focussed on client side integration with support or LDAP, Kerberos, OAuth2, SAML, etc. gcloud auth is based on OAuth2.

Install gke-gcloud-auth-plugin

You can install the gke-gcloud-auth-plugin plugin using the following gcloud command.

gcloud components install gke-gcloud-auth-plugin
Install gke-gcloud-auth-plugin

Validate gke-gcloud-auth-plugin

To validate the gke-gcloud-auth-plugin, you can run the gcloud command to connect to the Kubernetes cluster.

Here is an example command that you get from the GKE console.

$ gcloud container clusters get-credentials prometheus-cluster --zone us-central1-c --project aerial-reef-417506

Fetching cluster endpoint and auth data.
kubeconfig entry generated for prometheus-cluster.

As you can see from the output, the authentication is successfull and the GKE cluster configuration is added as the kubeconfig entry.

If you are getting started with Kubernetes, check out our list of comprehensive Kubernetes tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like