froometgn
froometgn

Reputation: 11

GKE gke-gcloud-auth-plugin

I'm trying to connect to a cluster and I'm getting the following error:

gcloud container clusters get-credentials cluster1 --region europe-west2 --project my-project
Fetching cluster endpoint and auth data.
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/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
kubeconfig entry generated for dbcell-cluster.

I have installed Google Cloud SDK 400, kubektl 1.22.12, gke-gcloud-auth-plugin 0.3.0, and also setup /~.bashrc with

export USE_GKE_GCLOUD_AUTH_PLUGIN=True

gke-gcloud-auth-plugin --version
Kubernetes v1.24.0-alpha+f42d1572e39979f6f7de03bd163f8ec04bc7950d

but when I try to connect to the cluster always I'm getting the same error, any idea here?

Thanks


The cluster exist in that region, also I verfied the env variable

with

echo $USE_GKE_GCLOUD_AUTH_PLUGIN
True

I installed the gke-gcloud-auth-plugin using gcloud components install... I do not know what more can I check

gcloud components list

Upvotes: 1

Views: 9277

Answers (1)

Eduardo Leal
Eduardo Leal

Reputation: 858

I solved the same problem by removing my current kubeconfig context for GCP.

  1. Get your context name running:

    kubectl config get-contexts

  2. Delete the context:

    kubectl config delete-context CONTEXT_NAME

  3. Reconfigure the credentials

    gcloud container clusters get-credentials CLUSTER_NAME --region REGION --project PROJECT

The warning message should be gone by now.

Upvotes: 2

Related Questions